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 - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -