python - pandas groupby access last group -


i have pandas dataframe looking this:

date      info                   x         y  b         z b         x c         y 

i want know last date. in case c.

i thought can grouping , sorting date column:

 df.groupby('date', sort=true) 

... , accessing last group. however, there no way of accessing last group one-liner? there better way this?

i think over-complicating things. c should enough:

df['date'].max() 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - How can I echo out this array? -

javascript - IE11 incompatibility with jQuery's 'readonly'? -