Skip to content

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

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions doc/source/merging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

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

Copy link
Author

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.

Copy link
Contributor

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

axis, 1 the column axis etc.
- ``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
Copy link
Contributor

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

Copy link
Author

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?

Copy link
Contributor

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

index axis and the index column is ignored. If the concatenation axis is 1,
it is the column axis and the column names are ignored.
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
Copy link
Member

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..."

Copy link
Contributor

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

Copy link
Author

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.

concatenation axis does not have meaningful indexing information. Note
the index values on the other axes are still respected in the join.
- ``join_axes`` : list of Index objects. Specific indexes to use for the other
Expand Down