Skip to content

REF: move SparseDtype, ArrowDtype to dtypes.dtypes #53116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
DataFrame,
)

from pandas.core.arrays.sparse import SparseDtype
from pandas.core.dtypes.dtypes import SparseDtype

from pandas.tseries.api import infer_freq
from pandas.tseries import offsets
Expand Down
4 changes: 4 additions & 0 deletions pandas/compat/pickle_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ def load_reduce(self):
"pandas.core.indexes.base",
"Index",
),
("pandas.core.arrays.sparse.dtype", "SparseDtype"): (
"pandas.core.dtypes.dtypes",
"SparseDtype",
),
}


Expand Down
2 changes: 1 addition & 1 deletion pandas/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pandas._libs.missing import NA

from pandas.core.dtypes.dtypes import (
ArrowDtype,
CategoricalDtype,
DatetimeTZDtype,
IntervalDtype,
Expand All @@ -25,7 +26,6 @@
value_counts,
)
from pandas.core.arrays import Categorical
from pandas.core.arrays.arrow import ArrowDtype
from pandas.core.arrays.boolean import BooleanDtype
from pandas.core.arrays.floating import (
Float32Dtype,
Expand Down
3 changes: 1 addition & 2 deletions pandas/core/arrays/arrow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from pandas.core.arrays.arrow.array import ArrowExtensionArray
from pandas.core.arrays.arrow.dtype import ArrowDtype

__all__ = ["ArrowDtype", "ArrowExtensionArray"]
__all__ = ["ArrowExtensionArray"]
3 changes: 2 additions & 1 deletion pandas/core/arrays/arrow/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@
import pyarrow as pa
import pyarrow.compute as pc

from pandas.core.dtypes.dtypes import ArrowDtype

from pandas.core.arrays.arrow._arrow_utils import fallback_performancewarning
from pandas.core.arrays.arrow.dtype import ArrowDtype

ARROW_CMP_FUNCS = {
"eq": pc.equal,
Expand Down
323 changes: 0 additions & 323 deletions pandas/core/arrays/arrow/dtype.py

This file was deleted.

2 changes: 0 additions & 2 deletions pandas/core/arrays/sparse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
SparseArray,
make_sparse_index,
)
from pandas.core.arrays.sparse.dtype import SparseDtype

__all__ = [
"BlockIndex",
"IntIndex",
"make_sparse_index",
"SparseAccessor",
"SparseArray",
"SparseDtype",
"SparseFrameAccessor",
]
Loading