我有以下pandas数据框架: import pandas as pd import numpy as np df = pd.DataFrame({ 'fc': [100,100,112,1.3,14,125], 'sample_id': ['S1','S1','S1','S2','S2','S2'], 'gene_symbol': ['a', 'b', 'c', 'a', 'b', 'c'], }) df = df[['gene_symbol', 'sample_id', 'fc']] df 这产生这个: Out[11]: gene_symbol sample_id fc 0 a S1 100.0 1 b S1 100.0 2 c S1 112.0 3 a S2 1.3 4 b S2 14.0 […]