-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Update merging.rst #17556
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
Update merging.rst #17556
Conversation
After having a small issue at #17552 I realized that this text could be more explicite.
Codecov Report
@@ Coverage Diff @@
## master #17556 +/- ##
==========================================
- Coverage 91.25% 91.23% -0.02%
==========================================
Files 163 163
Lines 49614 49614
==========================================
- Hits 45274 45265 -9
- Misses 4340 4349 +9
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #17556 +/- ##
==========================================
- Coverage 91.25% 91.17% -0.08%
==========================================
Files 163 163
Lines 49617 49664 +47
==========================================
+ Hits 45277 45281 +4
- Misses 4340 4383 +43
Continue to review full report at Codecov.
|
@1kastner : Thanks for this PR! Before we merge this, you'll need to update the doc-string for |
doc/source/merging.rst
Outdated
The resulting axis after concatenation will be labeled 0, ..., n - 1. | ||
That means that either the indices in the index column are replaced by | ||
new indices, column names are replaced by numbers etc. | ||
This is useful if you are concatenating objects where 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.
Nit : add commas when joining together two sentences with an "and" i.e.
- "...index axis, and the index column is ignored..."
- "...column axis, and the column names are ignored..."
Hello @1kastner! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on September 17, 2017 at 20:18 Hours UTC |
@@ -86,12 +86,18 @@ some configurable handling of "what to do with the other axes": | |||
it is passed, in which case the values will be selected (see below). Any None | |||
objects will be dropped silently unless they are all None in which case a | |||
ValueError will be raised. | |||
- ``axis`` : {0, 1, ...}, default 0. The axis to concatenate along. | |||
- ``axis`` : {0, 1, ...}, default 0. The axis to concatenate along. 0 is the index |
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.
make this more similar to the doc-string of pd.concat
(you can change either), but it should follow our existing conventions, and this is not it
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 am not sure what you ask me to do when you say "make more similar". The styles slightly differ and I tried to follow the styles I found.
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.
reread my comment
similar to the doc string as i said
- ``join`` : {'inner', 'outer'}, default 'outer'. How to handle indexes on | ||
other axis(es). Outer for union and inner for intersection. | ||
- ``ignore_index`` : boolean, default False. If True, do not use the index | ||
values on the concatenation axis. The resulting axis will be labeled 0, ..., | ||
n - 1. This is useful if you are concatenating objects where the | ||
values on the concatenation axis. If the concatenation axis is 0, it is 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.
this is too much text
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.
What makes you think that? For me there is a great difference between an index column and column names so that I wanted to stress this. How would you want to shorten it?
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 have a bunch of text here
it is too dense to read
concatenating objects where the concatenation axis does not have | ||
meaningful indexing information. Note the index values on the other | ||
axes are still respected in the join. | ||
If True, do not use the index values along the concatenation axis. |
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.
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.
do you mean the pd.concat.__doc__
issue?
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.
as i said
The resulting axis after concatenation will be labeled 0, ..., n - 1. | ||
That means that either the indices in the index column are replaced by | ||
new indices, column names are replaced by numbers etc. | ||
This is useful if you are concatenating objects where 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.
you might simply be able to use the pd.concat.__doc__
here directly, it should render
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.
What I did was copy and paste and adjust to the respective required format. How should I be able to use pd.concat.__doc__
? It was not used somewhere around I guess so that I was not aware of that feature.
Closed because of insufficient elaboration of feedback and different ideas of how explicit (and therefore long) the documentation should be. I would have prefered the documentation to be longer. |
@1kastner : No need to be this hasty to close it. We have time to work this out. |
After having a small issue at #17552 I realized that this text could be more explicit.
git diff upstream/master -u -- "*.py" | flake8 --diff