Taking elements from the solutions of @PallavBakshi and @Mike, the following works in Pandas >= 0.19:
a.loc[a.index[-1], 'a'] = 4.0
Just using iloc[-1, 'a'] won’t work as ‘a’ is not a location.
Taking elements from the solutions of @PallavBakshi and @Mike, the following works in Pandas >= 0.19:
a.loc[a.index[-1], 'a'] = 4.0
Just using iloc[-1, 'a'] won’t work as ‘a’ is not a location.