merge with series #13240
Labels
Compat
pandas objects compatability with Numpy or Python functions
Error Reporting
Incorrect or improved errors from pandas
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Code Sample, a copy-pastable example if possible
a=pd.DataFrame({'f':[1,2,3,4]})
b=pd.DataFrame({'f':[2,3,4,5]})
pd.merge(a['f'],b,on='f')
Traceback (most recent call last):
File "", line 1, in
File "/opt/ci1/plus/tc10b/sles11sp2_gcc-4.8.3_x86-64/PythonModules-2.7.8/20160310/lib/python/pandas/tools/merge.py", line 34, in merge
copy=copy, indicator=indicator)
File "/opt/ci1/plus/tc10b/sles11sp2_gcc-4.8.3_x86-64/PythonModules-2.7.8/20160310/lib/python/pandas/tools/merge.py", line 190, in init
self.join_names) = self._get_merge_keys()
File "/opt/ci1/plus/tc10b/sles11sp2_gcc-4.8.3_x86-64/PythonModules-2.7.8/20160310/lib/python/pandas/tools/merge.py", line 412, in _get_merge_keys
left_keys.append(left[lk]._values)
File "/opt/ci1/plus/tc10b/sles11sp2_gcc-4.8.3_x86-64/PythonModules-2.7.8/20160310/lib/python/pandas/core/series.py", line 557, in getitem
result = self.index.get_value(self, key)
File "/opt/ci1/plus/tc10b/sles11sp2_gcc-4.8.3_x86-64/PythonModules-2.7.8/20160310/lib/python/pandas/core/index.py", line 1790, in get_value
return self._engine.get_value(s, k)
File "pandas/index.pyx", line 103, in pandas.index.IndexEngine.get_value (pandas/index.c:3204)
File "pandas/index.pyx", line 111, in pandas.index.IndexEngine.get_value (pandas/index.c:2903)
File "pandas/index.pyx", line 159, in pandas.index.IndexEngine.get_loc (pandas/index.c:3908)
KeyError: 'f'
Expected Output
0 2
1 3
2 4
output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.8.final.0
python-bits: 64
OS: Linux
OS-release: 3.0.38-0.5-default
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: C
pandas: 0.17.1
nose: 1.3.6
pip: 1.5.6
setuptools: 0.6
Cython: 0.21.1
numpy: 1.9.3
scipy: 0.16.1
statsmodels: 0.6.1
IPython: 4.0.1
sphinx: 1.2.2
patsy: 0.3.0
dateutil: 2.3
pytz: 2015.4
blosc: None
bottleneck: 0.8.0
tables: 3.2.2
numexpr: 2.4
matplotlib: 1.4.3
openpyxl: 2.0.4
xlrd: 0.9.0
xlwt: 0.7.4
xlsxwriter: 0.7.3
lxml: 3.4.4
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 0.9.7
pymysql: 0.6.2.None
psycopg2: None
Jinja2: None
The text was updated successfully, but these errors were encountered: