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

ENH: Added the level arguments to the series and frame math operations #313

Closed
wants to merge 1 commit into from
Closed

Conversation

adamklein
Copy link
Contributor

such as sum, etc.

@wesm
Copy link
Member

wesm commented Nov 2, 2011

Awesome, thanks. I did the DataFrame docstring templating stuff I mentioned here and updated the return types in the Series methods

wesm@e775d09

I'll chase down the groupby error separately

@wesm wesm closed this Nov 2, 2011
wesm added a commit that referenced this pull request Nov 2, 2011
…aced due to # of args in DataFrame.mean changing in PR #313
@wesm
Copy link
Member

wesm commented Nov 2, 2011

fixed the bug in the above commit, turned out to be pretty simple

@@ -2456,6 +2458,10 @@ class DataFrame(NDFrame):
-------
sum : Series
"""
if not level is None:
Copy link
Member

Choose a reason for hiding this comment

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

You can write level is not None instead of not level is None

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this the preferred syntax? I know they're the same.

Copy link
Member

Choose a reason for hiding this comment

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

I see x is not None more than not x is None, but they're indeed equivalent

@wesm
Copy link
Member

wesm commented Nov 6, 2011

I just noticed that the DataFrame methods don't handle the axis == 1 case, I'll fix that

@wesm
Copy link
Member

wesm commented Nov 6, 2011

Need to also test skipna=True vs. skipna=False


def std(self, axis=None, dtype=None, out=None, ddof=1, skipna=True):
if level is None:
Copy link
Member

Choose a reason for hiding this comment

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

It would have been better to do this at the beginning of the method like many of the other places so you can skip the unnecessary work at the beginning of the function

wesm added a commit that referenced this pull request Nov 6, 2011
@wesm
Copy link
Member

wesm commented Nov 6, 2011

ok, I think I've got everything sorted in the above commit. Maybe a little test coverage remaining

@adamklein
Copy link
Contributor Author

I can write a couple more tests tomorrow if you'd like.

@wesm
Copy link
Member

wesm commented Nov 7, 2011

No worries, already added the additional tests. Seeing if I can get the release ready or almost tonight

dan-nadler pushed a commit to dan-nadler/pandas that referenced this pull request Sep 23, 2019
Set and read user defined metadata. This metadata is per symbol
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.

2 participants