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

pandas merge appear non-existent value the column b should not have value '1' #14076

Closed
ghost opened this issue Aug 24, 2016 · 2 comments
Closed
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@ghost
Copy link

ghost commented Aug 24, 2016

Code Sample, a copy-pastable example if possible

t = [1, 2, 3, 4, 5]

tt = [2, 3, 4, 5, 7]

d1 = DataFrame(t, columns=['a'], index=t)

d2 = DataFrame(tt, columns=['b'])

r = pd.merge(d1, d2, how='left', left_index=True, right_on='b', copy=False)

print(r)
pd.show_versions()

Expected Output

/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/bin/python3.5 /var/root/finalworkspace/python/daas/core/process_data.py
a b
4 1 1.0
0 2 2.0
1 3 3.0
2 4 4.0
3 5 5.0

output of pd.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.5.0.final.0
python-bits: 64
OS: Darwin
OS-release: 14.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None

pandas: 0.18.1
nose: None
pip: 8.1.2
setuptools: 25.1.4
Cython: None
numpy: 1.11.1
scipy: None
statsmodels: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.6.1
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: 0.6.7.None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None

Process finished with exit code 0

@ghost ghost changed the title pandas merge appear non-existent value the column b not have value '1' pandas merge appear non-existent value the column b should not have value '1' Aug 24, 2016
@ghost ghost closed this as completed Aug 24, 2016
@ghost ghost reopened this Aug 24, 2016
@sinhrks sinhrks added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Aug 25, 2016
@Dr-Irv
Copy link
Contributor

Dr-Irv commented Nov 30, 2016

This is related to the discussion in #13371.

@mroeschke
Copy link
Member

Since #13371 is further along in the discussion, closing in favor of that issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

No branches or pull requests

3 participants