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
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
# anypd.read_orc(...)
# and anypd.read_parquet(...)
# trigger DeprecationWarning: Passing a BlockManager to DataFrame is deprecated and will raise in a future version. Use public APIs instead.
Issue Description
The above happens only on main.
From read_parquet
../../.cache/pypoetry/virtualenvs/pandas-stubs-DrIM1v70-py3.11/lib/python3.11/site-packages/pandas/io/parquet.py:671: inread_parquetreturnimpl.read(
../../.cache/pypoetry/virtualenvs/pandas-stubs-DrIM1v70-py3.11/lib/python3.11/site-packages/pandas/io/parquet.py:280: inreadresult=pa_table.to_pandas(**to_pandas_kwargs)
pyarrow/array.pxi:884: inpyarrow.lib._PandasConvertible.to_pandas
???
pyarrow/table.pxi:4196: inpyarrow.lib.Table._to_pandas
???
pyarrow/pandas-shim.pxi:112: inpyarrow.lib._PandasAPIShim.data_frame
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self=<[AttributeError("'DataFrame' object has no attribute '_mgr'") raisedinrepr()] DataFrameobjectat0x7fdf70635210>data=BlockManagerItems: Index(['a', 'b'], dtype='object')
Axis1: Index([0, 1, 2], dtype='int64')
NumpyBlock: slice(0, 1, 1), 1x3, dtype: int64NumpyBlock: slice(1, 2, 1), 1x3, dtype: float64index=None, columns=None, dtype=None, copy=Nonedef__init__(
self,
data=None,
index: Axes|None=None,
columns: Axes|None=None,
dtype: Dtype|None=None,
copy: bool|None=None,
) ->None:
allow_mgr=FalseifdtypeisnotNone:
dtype=self._validate_dtype(dtype)
ifisinstance(data, DataFrame):
data=data._mgrallow_mgr=Trueiifnotcopy:
# if not copying data, ensure to still return a shallow copy# to avoid the result sharing the same Managerdata=data.copy(deep=False)
ifisinstance(data, (BlockManager, ArrayManager)):
ifnotallow_mgr:
# GH#52419>warnings.warn(
f"Passing a {type(data).__name__} to {type(self).__name__} ""is deprecated and will raise in a future version. ""Use public APIs instead.",
DeprecationWarning,
stacklevel=1, # bump to 2 once pyarrow 15.0 is released with fix
)
EDeprecationWarning: PassingaBlockManagertoDataFrameisdeprecatedandwillraiseinafutureversion. UsepublicAPIsinstead.
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
The above happens only on main.
From read_parquet
xref pandas-dev/pandas-stubs#819
Expected Behavior
No warning
Installed Versions
On main
The text was updated successfully, but these errors were encountered: