Pandas version checks
-
[X] I have checked that this issue has not already been reported.
-
[X] I have confirmed this bug exists on the latest version of pandas.
-
[X] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
File "/Users/NWMoriarty/sandbox/c_beta_deviation/top2018/../plot_cbeta_vs_phi_psi.py", line 396, in heatmap_matplotlib_or_seaborn
ax = sns.heatmap(a,
File "/Users/NWMoriarty/phenix/py3/conda_base/lib/python3.9/site-packages/seaborn/matrix.py", line 446, in heatmap
plotter = _HeatMapper(data, vmin, vmax, cmap, center, robust, annot, fmt,
File "/Users/NWMoriarty/phenix/py3/conda_base/lib/python3.9/site-packages/seaborn/matrix.py", line 113, in __init__
mask = _matrix_mask(data, mask)
File "/Users/NWMoriarty/phenix/py3/conda_base/lib/python3.9/site-packages/seaborn/matrix.py", line 92, in _matrix_mask
mask = mask | pd.isnull(data)
File "/Users/NWMoriarty/phenix/py3/conda_base/lib/python3.9/site-packages/pandas/core/ops/common.py", line 72, in new_method
return method(self, other)
File "/Users/NWMoriarty/phenix/py3/conda_base/lib/python3.9/site-packages/pandas/core/arraylike.py", line 84, in __ror__
return self._logical_method(other, roperator.ror_)
File "/Users/NWMoriarty/phenix/py3/conda_base/lib/python3.9/site-packages/pandas/core/frame.py", line 7589, in _arith_method
self, other = ops.align_method_FRAME(self, other, axis, flex=True, level=None)
File "/Users/NWMoriarty/phenix/py3/conda_base/lib/python3.9/site-packages/pandas/core/ops/__init__.py", line 282, in align_method_FRAME
right = to_series(right)
File "/Users/NWMoriarty/phenix/py3/conda_base/lib/python3.9/site-packages/pandas/core/ops/__init__.py", line 238, in to_series
if len(left.columns) != len(right):
TypeError: object of type 'map' has no len()
Issue Description
I'm sorry but I don't have a reproducer.
Expected Behavior
Not crash.
Installed Versions
Comment From: MarcoGorelli
not really much we can do here, sorry
if you can narrow down your code to the part which fails we can take a look
Comment From: nwmoriarty
I understand that not having a reproducer is an issue but in my experience looking at the lines of code can be informative. Surely, getting to that line of code and seeing that the obj does not have a len() is likely a more fundamental issue than my particular use. This code worked in python2.7 and now that I have updated my code to 3.9 the pandas code is failing. Appears like it may be python version issue.
Comment From: MarcoGorelli
in my experience looking at the lines of code can be informative
Great! If you can figure out what the fundamental issue is, please send a pull request to fix it - here's the contributing guide: https://pandas.pydata.org/docs/dev/development/contributing_environment.html