Freeze header in pandas dataframe

前端 未结 3 1712
旧时难觅i
旧时难觅i 2020-12-16 12:03

Is there a way by which I can freeze Pandas data frame header { as we do in excel}.So if its a long dataframe with multiple rows we can see the headers once we scroll down!!

3条回答
  •  执笔经年
    2020-12-16 12:50

    A solution that would work on any editor is to select what rows you want to look at:

    df.ix[100:110] # would show you from row 101 to 110 keeping the header on top
    

提交回复
热议问题