select multiple columns in pandas data frame with column index as sequential number

前端 未结 1 1866
北海茫月
北海茫月 2021-01-04 20:11

I am trying to extract the 7th to 14th columns in a data frame. However

df[0:3] only gives the 1st to 3rd rows.

Does anyone knows what should I

相关标签:
1条回答
  • 2021-01-04 20:43

    Looks that I found it....

    By using iloc..

    df.iloc[:,your_col_index]
    
    0 讨论(0)
提交回复
热议问题