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
Post a Comment