Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groupby on non-index axes #112

Closed
jbogaardt opened this issue Jan 21, 2021 · 0 comments
Closed

groupby on non-index axes #112

jbogaardt opened this issue Jan 21, 2021 · 0 comments

Comments

@jbogaardt
Copy link
Collaborator

Code that works in pandas should work for chainladder

import chainladder as cl
clrd = cl.load_sample('clrd')
clrd_pd = clrd.sum('origin').sum('development').to_frame()

groups = [i.find('Loss')>=0 for i in clrd.columns]

# Works for pandas
clrd_pd.groupby(groups, axis=1).sum(1)
# Fails for chainladder
clrd.groupby(groups, axis=1).sum(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant