W3docs

Get first row value of a given column

Here's an example of how you can get the first row value of a given column in a Pandas DataFrame in Python:

Here's an example of how you can get the first row value of a given column in a Pandas DataFrame in Python:

Get the first row value of a given column in a Pandas DataFrame in Python

python— editable, runs on the server
Info

Watch a video course: Python - The Practical Guide

You can also use df.loc[0,'B'] or df['B'][0] instead of df.at[0, 'B'] to get first row value of column 'B'.