BUG: merging with mixed types objects in py3 when unorderable · Issue #12814 · pandas-dev/pandas (original) (raw)

Code Sample, a copy-pastable example if possible

    df1 = dfAllStudies.copy(deep=True)  #make 2 copies of the same data
    df2 = dfAllStudies.copy(deep=True)

    #take a subset of 1 of the identical frames by dropping rows with certain dates
    df2 = df2[(df2['Reviewed on'] >= np.datetime64(DateWindowStart))]  

    #attempt to merge the frames on indexes
    common = pd.merge(df1, df2, left_index=True, right_index=True)

Whatever my data looks like, a copy, minus some rows, merged (on indexes) with a copy should function without error, no?

Expected Output

a merged dataframe and not:

\Anaconda3\lib\site-packages\pandas\tools\merge.py", line 535, in _get_join_indexers llab, rlab, shape = map(list, zip(* map(fkeys, left_keys, right_keys))) TypeError: type object argument after * must be a sequence, not map

output of pd.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 30 Stepping 5, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None

pandas: 0.18.0
nose: 1.3.7
pip: 8.1.0
setuptools: 20.2.2
Cython: 0.23.4
numpy: 1.10.4
scipy: 0.17.0
statsmodels: 0.6.1
xarray: None
IPython: 4.0.3
sphinx: 1.3.1
patsy: 0.4.0
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.4.6
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.8.4
lxml: 3.5.0
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.11
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.39.0
None