To get the last 100 observations of a pandas dataframe using iloc, you can use the following code snippet:
main.py15 chars2 lines
Here, df
is the name of the dataframe and we're using iloc to slice the dataframe using [:-100:] to get the last 100 rows.
gistlibby LogSnag