Pandas - Get first row value of a given column

前端 未结 7 1920
甜味超标
甜味超标 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:07

    Another way of getting the first row and preserving the index:

    x = df.first('d') # Returns the first day. '3d' gives first three days.
    

提交回复
热议问题