You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: Get deprecation warning from Series constructor #55228
If trying to create a series with a multiindex from two series I get a deprecation warning with pandas 2.1.1
DeprecationWarning: Series._data is deprecated and will be removed in a future version. Use public APIs instead.
Since I am not using _data explicitly it must come from inside of pandas. The only place I have found where this could come from is in the is_all_arraylike function where there is a hasattr(val, "_data") in the cython code.
Expected Behavior
I expect no warning and at least in pandas 2.0.3 this was the case.
Installed Versions
Details
Replace this line with the output of pd.show_versions()
Activity
lithomas1 commentedon Sep 21, 2023
pandas/pandas/_libs/lib.pyx
Line 869 in 2a08b05
is the offending line.
cc @jbrockmendel
jbrockmendel commentedon Sep 21, 2023
The hasattr check is bad. Changing it to
hasattr(type(val), "_data")might avoid the warning for now?paulreece commentedon Sep 21, 2023
I can confirm that the deprecation warning occurs on the main development branch.