I have the following data frame:
import pandas as pd d = {\'gene\' : [\'foo\',\'bar\'],\'score\' : [4., 3.,]} df = pd.DataFrame(d) df.set_index(\'gene\',inpl
Try swapping the indices in the brackets:
df.iloc[:,0]
This should work.