from pandas._libs import Timestamp as Timestamp
from pandas.core.base import PandasObject as PandasObject
from pandas.core.dtypes.cast import find_common_type as find_common_type, infer_dtype_from_scalar as infer_dtype_from_scalar, maybe_convert_objects as maybe_convert_objects, maybe_promote as maybe_promote

from pandas.core.dtypes.dtypes import ExtensionDtype as ExtensionDtype
from pandas.core.dtypes.generic import ABCExtensionArray as ABCExtensionArray, ABCSeries as ABCSeries
from pandas.core.dtypes.missing import isna as isna
from pandas.core.indexers import maybe_convert_indices as maybe_convert_indices
from pandas.core.indexes.api import Index as Index, MultiIndex as MultiIndex, ensure_index as ensure_index
from pandas.core.internals.blocks import Block as Block, CategoricalBlock as CategoricalBlock, DatetimeTZBlock as DatetimeTZBlock, ExtensionBlock as ExtensionBlock, ObjectValuesExtensionBlock as ObjectValuesExtensionBlock, get_block_type as get_block_type, make_block as make_block
from pandas.core.internals.concat import combine_concat_plans as combine_concat_plans, concatenate_join_units as concatenate_join_units, get_mgr_concatenation_plan as get_mgr_concatenation_plan, is_uniform_join_units as is_uniform_join_units
from pandas.io.formats.printing import pprint_thing as pprint_thing
from pandas.util._validators import validate_bool_kwarg as validate_bool_kwarg
from typing import Any, List, Optional, Sequence, Union

class BlockManager(PandasObject):
    axes: Any = ...
    blocks: Any = ...
    def __init__(self, blocks: Sequence[Block], axes: Sequence[Index], do_integrity_check: bool=...) -> None: ...
    def make_empty(self, axes: Optional[Any] = ...) -> Any: ...
    def __nonzero__(self) -> Any: ...
    __bool__: Any = ...
    @property
    def shape(self) -> Any: ...
    @property
    def ndim(self) -> int: ...
    def set_axis(self, axis: Any, new_labels: Any) -> None: ...
    def rename_axis(self, mapper: Any, axis: Any, copy: bool = ..., level: Optional[Any] = ...) -> Any: ...
    @property
    def items(self) -> Any: ...
    def get_dtype_counts(self) -> Any: ...
    def get_dtypes(self) -> Any: ...
    def __len__(self) -> int: ...
    def reduce(self, func: Any, *args: Any, **kwargs: Any) -> Any: ...
    def apply(self, f: Any, filter: Optional[Any] = ..., **kwargs: Any) -> Any: ...
    def quantile(self, axis: int = ..., consolidate: bool = ..., transposed: bool = ..., interpolation: str = ..., qs: Optional[Any] = ..., numeric_only: Optional[Any] = ...) -> Any: ...
    def isna(self, func: Any) -> Any: ...
    def where(self, **kwargs: Any) -> Any: ...
    def setitem(self, **kwargs: Any) -> Any: ...
    def putmask(self, **kwargs: Any) -> Any: ...
    def diff(self, **kwargs: Any) -> Any: ...
    def interpolate(self, **kwargs: Any) -> Any: ...
    def shift(self, **kwargs: Any) -> Any: ...
    def fillna(self, **kwargs: Any) -> Any: ...
    def downcast(self, **kwargs: Any) -> Any: ...
    def astype(self, dtype: Any, copy: bool=..., errors: str=...) -> Any: ...
    def convert(self, **kwargs: Any) -> Any: ...
    def replace(self, value: Any, **kwargs: Any) -> Any: ...
    def replace_list(self, src_list: Any, dest_list: Any, inplace: bool = ..., regex: bool = ...) -> Any: ...
    def is_consolidated(self) -> Any: ...
    @property
    def is_mixed_type(self) -> Any: ...
    @property
    def is_numeric_mixed_type(self) -> Any: ...
    @property
    def is_datelike_mixed_type(self) -> Any: ...
    @property
    def any_extension_types(self) -> Any: ...
    @property
    def is_view(self) -> Any: ...
    def get_bool_data(self, copy: bool = ...) -> Any: ...
    def get_numeric_data(self, copy: bool = ...) -> Any: ...
    def combine(self, blocks: Any, copy: bool = ...) -> Any: ...
    def get_slice(self, slobj: slice, axis: int=...) -> Any: ...
    def __contains__(self, item: Any) -> bool: ...
    @property
    def nblocks(self) -> int: ...
    def copy(self, deep: bool = ...) -> Any: ...
    def as_array(self, transpose: bool = ..., items: Optional[Any] = ...) -> Any: ...
    def to_dict(self, copy: bool = ...) -> Any: ...
    def fast_xs(self, loc: Any) -> Any: ...
    def consolidate(self) -> Any: ...
    def get(self, item: Any) -> Any: ...
    def iget(self, i: Any) -> Any: ...
    def delete(self, item: Any) -> None: ...
    def set(self, item: Any, value: Any) -> Any: ...
    def insert(self, loc: int, item: Any, value: Any, allow_duplicates: bool=...) -> Any: ...
    def reindex_axis(self, new_index: Any, axis: Any, method: Optional[Any] = ..., limit: Optional[Any] = ..., fill_value: Optional[Any] = ..., copy: bool = ...) -> Any: ...
    def reindex_indexer(self, new_axis: Any, indexer: Any, axis: Any, fill_value: Optional[Any] = ..., allow_dups: bool = ..., copy: bool = ...) -> Any: ...
    def take(self, indexer: Any, axis: int = ..., verify: bool = ..., convert: bool = ...) -> Any: ...
    def equals(self, other: Any) -> Any: ...
    def unstack(self, unstacker_func: Any, fill_value: Any) -> Any: ...

class SingleBlockManager(BlockManager):
    ndim: int = ...
    axes: Any = ...
    blocks: Any = ...
    def __init__(self, block: Block, axis: Union[Index, List[Index]], do_integrity_check: bool=..., fastpath: bool=...) -> None: ...
    def get_slice(self, slobj: Any, axis: int = ...) -> Any: ...
    @property
    def index(self) -> Any: ...
    @property
    def dtype(self) -> Any: ...
    @property
    def array_dtype(self) -> Any: ...
    def get_dtype_counts(self) -> Any: ...
    def get_dtypes(self) -> Any: ...
    def external_values(self) -> Any: ...
    def internal_values(self) -> Any: ...
    def get_values(self) -> Any: ...
    def is_consolidated(self) -> Any: ...
    def delete(self, item: Any) -> None: ...
    def fast_xs(self, loc: Any) -> Any: ...
    def concat(self, to_concat: Any, new_axis: Any) -> Any: ...

def create_block_manager_from_blocks(blocks: Any, axes: Any) -> Any: ...
def create_block_manager_from_arrays(arrays: Any, names: Any, axes: Any) -> Any: ...
def construction_error(tot_items: Any, block_shape: Any, axes: Any, e: Optional[Any] = ...) -> None: ...
def form_blocks(arrays: Any, names: Any, axes: Any) -> Any: ...
def concatenate_block_managers(mgrs_indexers: Any, axes: Any, concat_axis: Any, copy: Any) -> Any: ...

def _transform_index(index: Any, func: Any, level: Any) -> Any: ...
