Pandas - Get first row value of a given column

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

    To get e.g the value from column 'test' and row 1 it works like

    df[['test']].values[0][0]
    

    as only df[['test']].values[0] gives back a array

提交回复
热议问题