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

MAINT: use int for groupby #92

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

MAINT: use int for groupby #92

wants to merge 3 commits into from

Conversation

vikram-narayan
Copy link
Contributor

Instead of using the index name in the call to groupby, use the index level number.

@@ -138,4 +138,4 @@ def compute_exposures(positions, factor_loadings):
2017-01-02 0.821872 1.520515
"""
risk_exposures = factor_loadings.multiply(positions, axis='rows')
return risk_exposures.groupby(level='dt').sum()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a test we can add/modify to go along with this change?

@ssanderson
Copy link

LGTM assuming tests pass

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

Successfully merging this pull request may close these issues.

3 participants