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

Update merging.rst #17556

wants to merge 6 commits into from

Conversation

1kastner
Copy link

@1kastner 1kastner commented Sep 16, 2017

After having a small issue at #17552 I realized that this text could be more explicit.

  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

After having a small issue at #17552 I realized that this text could be more explicite.
@codecov
Copy link

codecov bot commented Sep 16, 2017

Codecov Report

Merging #17556 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 89.02% <ø> (ø) ⬆️
#single 40.19% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.77% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5cfdbb...80a1104. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 16, 2017

Codecov Report

Merging #17556 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 89.02% <ø> (ø) ⬆️
#single 40.19% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/reshape/concat.py 97.6% <ø> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/api.py 87.5% <0%> (-12.5%) ⬇️
pandas/core/indexes/interval.py 90.5% <0%> (-3.08%) ⬇️
pandas/core/indexes/datetimes.py 94.73% <0%> (-0.8%) ⬇️
pandas/core/frame.py 97.77% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40e19bb...9c12863. Read the comment docs.

@gfyoung
Copy link
Member

gfyoung commented Sep 16, 2017

@1kastner : Thanks for this PR! Before we merge this, you'll need to update the doc-string for pandas.concat in the codebase. You can find the function in pandas/core/reshape.py

@gfyoung gfyoung added Docs Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Sep 16, 2017
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..."

@pep8speaks
Copy link

pep8speaks commented Sep 17, 2017

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

- ``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

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same.

Copy link
Author

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?

Copy link
Contributor

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

@1kastner
Copy link
Author

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 1kastner closed this Sep 17, 2017
@gfyoung
Copy link
Member

gfyoung commented Sep 17, 2017

@1kastner : No need to be this hasty to close it. We have time to work this out.

@gfyoung gfyoung reopened this Sep 17, 2017
@1kastner 1kastner closed this Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants