Answers for "first and last in dataframe row"

1

location of last row dataframe

rows = df.iloc[-2:]
Posted by: Guest on December-04-2020
0

Python pandas first and last element of column

>>> df['date'][df.index[0]]
10
>>> df['date'][df.index[-1]]
58
Posted by: Guest on December-19-2021

Code answers related to "first and last in dataframe row"

Python Answers by Framework

Browse Popular Code Answers by Language