Skip to content

Commit

Permalink
REF: move SparseDtype, ArrowDtype to dtypes.dtypes (#53116)
Browse files Browse the repository at this point in the history
* REF: move SparseDtype to dtypes.dtypes

* REF: move ArrowDtype to dtypes.dtypes
  • Loading branch information
jbrockmendel committed May 15, 2023
1 parent 4f88a2a commit 2b107bf
Show file tree
Hide file tree
Showing 37 changed files with 841 additions and 875 deletions.
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",
]

0 comments on commit 2b107bf

Please sign in to comment.