Skip to content
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: minor doc fix for Series.append; indices can overlap #10200

Merged
merged 1 commit into from
May 25, 2015

Conversation

jakevdp
Copy link
Contributor

@jakevdp jakevdp commented May 22, 2015

Old docstring seemed to be incorrect; overlapping indices are supported e.g.

>>> import pandas as pd
>>> x = pd.Series(['A', 'B', 'C'])
>>> y = pd.Series(['D', 'E', 'F'])
>>> x.append(y)
0    A
1    B
2    C
0    D
1    E
2    F
dtype: object

@mortada
Copy link
Contributor

mortada commented May 22, 2015

This would raise if verify_integrity=True though, seems like what that was meant for.

In [6]: x.append(y, verify_integrity=True)
ValueError: Indexes have overlapping values: [0, 1, 2]

Perhaps a good idea to do this?

 The indexes must not overlap if verify_integrity is True

@jakevdp
Copy link
Contributor Author

jakevdp commented May 23, 2015

The documentation of verify_integrity already says this pretty clearly. I'm not sure the information needs to be repeated in the general description. For what it's worth, DataFrame.append and pd.concat both have the same behavior, and don't mention anything about duplicate indices in the general description.

@jorisvandenbossche
Copy link
Member

I think this looks good!

@mortada
Copy link
Contributor

mortada commented May 23, 2015

@jakevdp ah I see, yeah that makes sense

@jorisvandenbossche jorisvandenbossche added this to the 0.17.0 milestone May 25, 2015
jorisvandenbossche added a commit that referenced this pull request May 25, 2015
DOC: minor doc fix for Series.append; indices can overlap
@jorisvandenbossche jorisvandenbossche merged commit b70d819 into pandas-dev:master May 25, 2015
@jorisvandenbossche
Copy link
Member

@jakevdp Thanks!

@jorisvandenbossche jorisvandenbossche modified the milestones: 0.17.0, 0.16.2 Jun 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants