Skip to content

DOC: Unclear first example in pandas.DataFrame.append #41407

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
t0asty opened this issue May 10, 2021 · 2 comments · Fixed by #41444
Closed

DOC: Unclear first example in pandas.DataFrame.append #41407

t0asty opened this issue May 10, 2021 · 2 comments · Fixed by #41444

Comments

@t0asty
Copy link
Contributor

t0asty commented May 10, 2021

Location of the documentation

pandas.DataFrame.append

Documentation problem

I think the example chosen to show the difference between ignore_index=False and ignore_index = True (the very first on the page) could make this difference more clear.

Suggested fix for documentation

Choosing a custom index for the first df (the one whose append function is called) could help to especially point out the fact that ignore_index=True actually overwrites the whole index and does not keep the index of the first dataframe, as it could be interpreted from this example (given somebody dared to not read the doc above 😉 )

@t0asty t0asty added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels May 10, 2021
@attack68
Copy link
Contributor

yes I agree. Thanks for the report. Do feel free to contribute this idea via a PR!

@attack68 attack68 removed the Needs Triage Issue that has not been reviewed by a pandas team member label May 10, 2021
@lithomas1 lithomas1 added this to the Contributions Welcome milestone May 12, 2021
@t0asty
Copy link
Contributor Author

t0asty commented May 12, 2021

On it :)

t0asty added a commit to t0asty/pandas that referenced this issue May 12, 2021
…v#41407

Change index to [0, 2] to stress that ignore_index=True resets the index of both dataframes
t0asty added a commit to t0asty/pandas that referenced this issue May 12, 2021
t0asty added a commit to t0asty/pandas that referenced this issue May 14, 2021
@jreback jreback modified the milestones: Contributions Welcome, 1.3 May 14, 2021
t0asty added a commit to t0asty/pandas that referenced this issue May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants