Skip to content

Commit

Permalink
Put create_manager_from_blocks in internals.api (#55575)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored Oct 18, 2023
1 parent 59d4e84 commit a9fce50
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pandas/core/internals/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,25 @@ def maybe_infer_ndim(values, placement: BlockPlacement, ndim: int | None) -> int
else:
ndim = values.ndim
return ndim


def __getattr__(name: str):
import warnings

from pandas.util._exceptions import find_stack_level

if name == "create_block_manager_from_blocks":
# GH#33892
warnings.warn(
f"{name} is deprecated and will be removed in a future version. "
"Use public APIs instead.",
DeprecationWarning,
stacklevel=find_stack_level(),
)
from pandas.core.internals.managers import create_block_manager_from_blocks

return create_block_manager_from_blocks

raise AttributeError(
f"module 'pandas.core.internals.api' has no attribute '{name}'"
)

0 comments on commit a9fce50

Please sign in to comment.