How to get last element of Pandas Series

Use .iloc[-1] to get the last element of a pandas Series, for example:

example.py
my_dataframe['MyColumn'].iloc[-1]

 


Check out similar posts by category: Pandas, Python