Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ID month country count style
- 1 2012-02 UK 3 high
- 1 2012-02 US 10 high
- 1 2012-02 FR 5 high
- etc
- aggregated_data = setDT(subset)[, .(Country = list(Country), ID = min(ID),
- count = sum(count), by = list(Model, Month)][]
- ID month country count
- 1 2012-02 UK, US, FR 18
- etc
Add Comment
Please, Sign In to add comment