Skip to content

Commit bbc6e30

Browse files
committed
CLN: move pandas.types -> pandas.core.types
xref #13634
1 parent 614a48e commit bbc6e30

File tree

131 files changed

+716
-629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+716
-629
lines changed

asv_bench/benchmarks/categoricals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .pandas_vb_common import *
22
try:
3-
from pandas.types.concat import union_categoricals
3+
from pandas.core.types.concat import union_categoricals
44
except ImportError:
55
pass
66

doc/source/whatsnew/v0.20.0.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,12 +1000,13 @@ New Behavior:
10001000
In [11]: index.memory_usage(deep=True)
10011001
Out[11]: 260
10021002

1003-
.. _whatsnew_0200.api_breaking.extensions:
1003+
.. _whatsnew_0200.api_breaking.privacy:
10041004

1005-
Extension Modules Moved
1006-
^^^^^^^^^^^^^^^^^^^^^^^
1005+
Modules Privacy Has Changed
1006+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
10071007

1008-
Some formerly public c/c++/cython extension modules have been moved and/or renamed. These are all removed from the public API.
1008+
Some formerly public python/c/c++/cython extension modules have been moved and/or renamed. These are all removed from the public API.
1009+
Further more, the ``pandas.core``, ``pandas.io``, and ``pandas.util`` top-level modules are now considered to be PRIVATE.
10091010
If indicated, a deprecation warning will be issued if you reference that module. (:issue:`12588`)
10101011

10111012
.. csv-table::
@@ -1022,6 +1023,7 @@ If indicated, a deprecation warning will be issued if you reference that module.
10221023
"pandas.hashtable", "pandas._libs.hashtable", ""
10231024
"pandas.json", "pandas.io.json.libjson", "X"
10241025
"pandas.parser", "pandas.io.libparsers", "X"
1026+
"pandas.types", "pandas.core.types", ""
10251027
"pandas.io.sas.saslib", "pandas.io.sas.libsas", ""
10261028
"pandas._testing", "pandas.util.libtesting", ""
10271029
"pandas._sparse", "pandas.sparse.libsparse", ""

pandas/api/types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
""" public toolkit API """
22

3-
from pandas.types.api import * # noqa
3+
from pandas.core.types.api import * # noqa
44
del np # noqa

pandas/compat/numpy/function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from pandas.util.validators import (validate_args, validate_kwargs,
2323
validate_args_and_kwargs)
2424
from pandas.errors import UnsupportedFunctionCall
25-
from pandas.types.common import is_integer, is_bool
25+
from pandas.core.types.common import is_integer, is_bool
2626
from pandas.compat import OrderedDict
2727

2828

pandas/computation/ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import numpy as np
99

10-
from pandas.types.common import is_list_like, is_scalar
10+
from pandas.core.types.common import is_list_like, is_scalar
1111
import pandas as pd
1212
from pandas.compat import PY3, string_types, text_type
1313
import pandas.core.common as com

pandas/computation/pytables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import numpy as np
66
import pandas as pd
77

8-
from pandas.types.common import is_list_like
8+
from pandas.core.types.common import is_list_like
99
import pandas.core.common as com
1010
from pandas.compat import u, string_types, DeepChainMap
1111
from pandas.core.base import StringMixin

pandas/core/algorithms.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
import numpy as np
88

99
from pandas import compat, _np_version_under1p8
10-
from pandas.types.cast import maybe_promote
11-
from pandas.types.generic import (ABCSeries, ABCIndex,
12-
ABCIndexClass, ABCCategorical)
13-
from pandas.types.common import (
10+
from pandas.core.types.cast import maybe_promote
11+
from pandas.core.types.generic import (
12+
ABCSeries, ABCIndex,
13+
ABCIndexClass, ABCCategorical)
14+
from pandas.core.types.common import (
1415
is_unsigned_integer_dtype, is_signed_integer_dtype,
1516
is_integer_dtype, is_complex_dtype,
1617
is_categorical_dtype, is_sparse,
@@ -25,7 +26,7 @@
2526
_ensure_float64, _ensure_uint64,
2627
_ensure_int64)
2728
from pandas.compat.numpy import _np_version_under1p10
28-
from pandas.types.missing import isnull
29+
from pandas.core.types.missing import isnull
2930

3031
import pandas.core.common as com
3132
from pandas.compat import string_types

pandas/core/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import numpy as np
66

77
from pandas.core.algorithms import factorize, unique, value_counts
8-
from pandas.types.missing import isnull, notnull
8+
from pandas.core.types.missing import isnull, notnull
99
from pandas.core.categorical import Categorical
1010
from pandas.core.groupby import Grouper
1111
from pandas.formats.format import set_eng_float_format

pandas/core/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from pandas.compat import builtins
77
import numpy as np
88

9-
from pandas.types.missing import isnull
10-
from pandas.types.generic import ABCDataFrame, ABCSeries, ABCIndexClass
11-
from pandas.types.common import is_object_dtype, is_list_like, is_scalar
9+
from pandas.core.types.missing import isnull
10+
from pandas.core.types.generic import ABCDataFrame, ABCSeries, ABCIndexClass
11+
from pandas.core.types.common import is_object_dtype, is_list_like, is_scalar
1212
from pandas.util.validators import validate_bool_kwarg
1313

1414
from pandas.core import common as com
@@ -725,7 +725,7 @@ def _aggregate_multiple_funcs(self, arg, _level, _axis):
725725
# we are concatting non-NDFrame objects,
726726
# e.g. a list of scalars
727727

728-
from pandas.types.cast import is_nested_object
728+
from pandas.core.types.cast import is_nested_object
729729
from pandas import Series
730730
result = Series(results, index=keys, name=self.name)
731731
if is_nested_object(result):

pandas/core/categorical.py

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,24 @@
88
from pandas.compat import u, lzip
99
from pandas._libs import lib, algos as libalgos
1010

11-
from pandas.types.generic import ABCSeries, ABCIndexClass, ABCCategoricalIndex
12-
from pandas.types.missing import isnull, notnull
13-
from pandas.types.cast import (maybe_infer_to_datetimelike,
14-
coerce_indexer_dtype)
15-
from pandas.types.dtypes import CategoricalDtype
16-
from pandas.types.common import (_ensure_int64,
17-
_ensure_object,
18-
_ensure_platform_int,
19-
is_dtype_equal,
20-
is_datetimelike,
21-
is_categorical,
22-
is_categorical_dtype,
23-
is_integer_dtype, is_bool,
24-
is_list_like, is_sequence,
25-
is_scalar)
11+
from pandas.core.types.generic import (
12+
ABCSeries, ABCIndexClass, ABCCategoricalIndex)
13+
from pandas.core.types.missing import isnull, notnull
14+
from pandas.core.types.cast import (
15+
maybe_infer_to_datetimelike,
16+
coerce_indexer_dtype)
17+
from pandas.core.types.dtypes import CategoricalDtype
18+
from pandas.core.types.common import (
19+
_ensure_int64,
20+
_ensure_object,
21+
_ensure_platform_int,
22+
is_dtype_equal,
23+
is_datetimelike,
24+
is_categorical,
25+
is_categorical_dtype,
26+
is_integer_dtype, is_bool,
27+
is_list_like, is_sequence,
28+
is_scalar)
2629
from pandas.core.common import is_null_slice
2730

2831
from pandas.core.algorithms import factorize, take_1d, unique1d
@@ -1215,7 +1218,7 @@ def value_counts(self, dropna=True):
12151218
12161219
"""
12171220
from numpy import bincount
1218-
from pandas.types.missing import isnull
1221+
from pandas.core.types.missing import isnull
12191222
from pandas.core.series import Series
12201223
from pandas.core.index import CategoricalIndex
12211224

0 commit comments

Comments
 (0)