0

I was able to get the last row of a DataFrame in pandas with this line

df.tail(1)

How do I get the first column's cell in this row? - I tried

df.tail(1)[0,0]

and it did not work

ALollz
  • 54,844
  • 7
  • 56
  • 77
Dave
  • 35
  • 6

1 Answers1

1

Use this solution :

df.iloc[-1,0]

Read more about iloc here.

Behzad Shayegh
  • 203
  • 1
  • 9