Pandas - Get first row value of a given column

前端 未结 7 1928
甜味超标
甜味超标 2020-11-28 18:05

This seems like a ridiculously easy question... but I\'m not seeing the easy answer I was expecting.

So, how do I get the value at an nth row of a given column in Pa

7条回答
  •  清歌不尽
    2020-11-28 18:23

    In a general way, if you want to pick up the first N rows from the J column from pandas dataframe the best way to do this is:

    data = dataframe[0:N][:,J]
    

提交回复
热议问题