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
<div class="alert alert-info flex not-prose">![]()
<span class="hidden md:block">Watch a video course</span>Python - The Practical Guide</div>
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'.