Suppose I have a DataFrame such as:
df = pd.DataFrame(np.random.randn(10, 5), columns=['a','b','c','d','e'])
and I would like to retrieve the last value in column e. I could do:
df['e'].tail(1)
but this would return a series which has index 9 with it. Ideally, I just want to obtain the value as a number that I can work with directly. I could also do:
np.array(df['e'].tail(1))
but this would then require me to access/call the 0th element of it before I can really work with it. Is there a more direct/easy way to do this?