-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Removed Notes from DataFrame.applymap #31695
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
Conversation
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.
Thanks for the PR! There's a linting issue at https://github.com/pandas-dev/pandas/pull/31695/checks?check_run_id=427378996#step:10:25.
I think you may need o remove a newline somewhere. Not entirely sure where though.
Please review this @TomAugspurger |
Thanks @r0cketr1kky Looks like you've checked in some unwanted files (e.g. |
pandas/core/frame.py
Outdated
Note that a vectorized version of `func` often exists, which will | ||
be much faster. You could square each number elementwise. | ||
You could square each number elementwise. |
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.
This part doesn't need changing, the vectorised version is still faster:
In [28]: s = pd.Series(np.random.randn(10000))
In [29]: %timeit s.apply(lambda x: x**2)
6.39 ms ± 5.73 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
In [30]: %timeit s**2
243 µs ± 4.38 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
In [31]: pd.testing.assert_series_equal(s.apply(lambda x: x**2), s**2)
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.
Oh okay. Thanks a lot. Included it.
Hello @r0cketr1kky! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-03-31 13:43:31 UTC |
Please review this! |
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.
if you can only have the 1 change in this PR
@@ -10329,6 +10329,26 @@ def _doc_parms(cls): | |||
%(examples)s | |||
""" | |||
|
|||
_num_doc_mad = """ | |||
%(desc)s |
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.
this is an unrelated change, can you revert
@@ -6969,14 +6969,6 @@ def applymap(self, func) -> "DataFrame": | |||
-------- | |||
DataFrame.apply : Apply a function along input axis of DataFrame. | |||
|
|||
Notes | |||
----- | |||
In the current implementation applymap calls `func` twice on the |
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 no longer accurate? we regularly get questions about the user-defined functions being called in groupby.apply/agg to determine fast vs slow path
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.
This seems stale. @r0cketr1kky if you want to finish this (mainly remove the unrelated changes), please open a PR or ping us here to reopen. Thanks! |
Sorry for being late! I just noticed this @datapythonista ! Can you reopen this? I'll revert back with the changes. |
@r0cketr1kky can you merge master and update |
be much faster. You could square each number elementwise. | ||
Note that a vectorized version of `func` often exists, | ||
which will be much faster. | ||
You could square each number elementwise. |
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.
can you revert this
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.
Sorry, for being late! I'm having a very busy semester. I'll do this asap and get back!
It doesn't look to me like this issue is actually solved. |
Documentation screenshot:
