-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Conversation
such as sum, etc.
Awesome, thanks. I did the DataFrame docstring templating stuff I mentioned here and updated the return types in the Series methods I'll chase down the groupby error separately |
…aced due to # of args in DataFrame.mean changing in PR #313
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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
I just noticed that the DataFrame methods don't handle the |
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: |
There was a problem hiding this comment.
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
ok, I think I've got everything sorted in the above commit. Maybe a little test coverage remaining |
I can write a couple more tests tomorrow if you'd like. |
No worries, already added the additional tests. Seeing if I can get the release ready or almost tonight |
Set and read user defined metadata. This metadata is per symbol
such as sum, etc.