|
|
|
|
|
by hervature
1607 days ago
|
|
To do that, the code would look something like: mask = events["Date"].year == 2020
events[mask].groupby("EventType").agg(first_date=("Date", min), last_date=("Date", max), count=("Date", len)) Anyway, I don't understand why terseness is even desirable. We're doing DS and ML, no project never comes down to keystrokes but ability to search the docs and debug does matter. |
|
- How many events by type
- When did they happen
- Are there any breaks in the count, why?
- Some statistics on these events like average, min, max
and so on. Terseness helps me in doing this fast.