-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Upgraded Docstring pandas.DataFrame.dot #23024
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
DOC: Upgraded Docstring pandas.DataFrame.dot #23024
Conversation
Hello @HubertKl! Thanks for submitting the PR.
|
Codecov Report
@@ Coverage Diff @@
## master #23024 +/- ##
=======================================
Coverage 92.2% 92.2%
=======================================
Files 162 162
Lines 51700 51700
=======================================
Hits 47671 47671
Misses 4029 4029
Continue to review full report at Codecov.
|
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 contribution @HubertKl, and sorry this got lost and wasn't reviewed until now.
Added few comments.
pandas/core/frame.py
Outdated
Return the Series of the matrix product between the Dataframe and | ||
other if other is a Series, the Dataframe of the matrix product of | ||
each columns of the DataFrame/np.array and each columns of other | ||
if other is a DataFrame or a numpy.ndarray. |
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 rephrase this? Can't really understand it, we probably need to have more than one sentence.
pandas/core/frame.py
Outdated
See Also | ||
-------- | ||
Series.dot: Compute the inner product of a Series with another Series | ||
or the columns of a DataFrame or the columns of a numpy array. |
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 say instead "Same method for Series." or similar if that makes sense.
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.
do you mind changing this?
pandas/core/frame.py
Outdated
Examples | ||
-------- | ||
>>> df = pd.DataFrame([[0, 1, -2, 3], [4, -5, 6, 7]]) | ||
>>> s = pd.Series([0, 1, 2, 3]) |
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 try to use smaller / easier values, so the math can be done mentally?
Also, avoid the print
functions, the value will be shown without them too.
And divide the examples in groups with a blank line between them, and probably a short explanation of what you're doing would help reading.
@HubertKl do you have time to address the review comments and fix the conflicts? |
I tried to address the issues. Sorry for the delay but I didn't figure that the review would append only now. |
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.
looks great, just two minor things, and it's ready
pandas/core/frame.py
Outdated
This method computes the matrix product between the DataFrame and the | ||
values of an other Series, DataFrame or a numpy array. | ||
|
||
It can also be called using `self @ other` in Python >= 3.5. |
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 can also be called using `self @ other` in Python >= 3.5. | |
It can also be called using ``self @ other`` in Python >= 3.5. |
sorry I didn't see that before, for code we use double backticks (single backticks are for things we reference, like a function name, a class, a variable...)
pandas/core/frame.py
Outdated
See Also | ||
-------- | ||
Series.dot: Compute the inner product of a Series with another Series | ||
or the columns of a DataFrame or the columns of a numpy array. |
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.
do you mind changing this?
It is done. |
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.
lgtm, thanks @HubertKl
if you can merge master and update the PR branch, to rerun the CI and leave it green
@HubertKl do you have time to merge master into your branch, so we can merge? |
@jreback this should be ready to be merged |
thanks @HubertKl |
git diff upstream/master -u -- "*.py" | flake8 --diff