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
  • 57,915
  • 7
  • 66
  • 89
Dave
  • 45
  • 1
  • 6

1 Answers1

2

Use this solution :

df.iloc[-1,0]

Read more about iloc here.

Behzad Shayegh
  • 323
  • 1
  • 10