I have a dataframe that contains the following,
Reading
Date
2020-05-09 14:54:00 13661
2020-05-09 14:55:00 13672
2020-05-09 14:56:00 14251
2020-05-09 14:59:00 15255
I have figured out how to extract the last element:
lastelement=(series["Reading"].iloc[-1])
which gives me "15255"
Note:the first column is the index not a column in the dataframe as such.
so I also want to extract the index value for that same element (which may not be unique int the readings column), i.e. "2020-05-09 14:59:00"
I can anybody help?
thanks
(forgive me if my question is poor, its my first post on stackoverflow! - I can usually work my answers out from all of the other questions/answers presented here)