Skip to content

Commit

Permalink
rename types -> typed to avoid conflict with std library
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed Apr 14, 2017
1 parent 8044942 commit 387a9e6
Show file tree
Hide file tree
Showing 128 changed files with 227 additions and 227 deletions.
2 changes: 1 addition & 1 deletion asv_bench/benchmarks/categoricals.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .pandas_vb_common import *
try:
from pandas.core.types.concat import union_categoricals
from pandas.core.typed.concat import union_categoricals
except ImportError:
pass

Expand Down
2 changes: 1 addition & 1 deletion pandas/api/types/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" public toolkit API """

from pandas.core.types.api import * # noqa
from pandas.core.typed.api import * # noqa
del np # noqa
2 changes: 1 addition & 1 deletion pandas/compat/numpy/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from pandas.util.validators import (validate_args, validate_kwargs,
validate_args_and_kwargs)
from pandas.errors import UnsupportedFunctionCall
from pandas.core.types.common import is_integer, is_bool
from pandas.core.typed.common import is_integer, is_bool
from pandas.compat import OrderedDict


Expand Down
2 changes: 1 addition & 1 deletion pandas/computation/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import numpy as np

from pandas.core.types.common import is_list_like, is_scalar
from pandas.core.typed.common import is_list_like, is_scalar
import pandas as pd
from pandas.compat import PY3, string_types, text_type
import pandas.core.common as com
Expand Down
2 changes: 1 addition & 1 deletion pandas/computation/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np
import pandas as pd

from pandas.core.types.common import is_list_like
from pandas.core.typed.common import is_list_like
import pandas.core.common as com
from pandas.compat import u, string_types, DeepChainMap
from pandas.core.base import StringMixin
Expand Down
8 changes: 4 additions & 4 deletions pandas/core/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import numpy as np

from pandas import compat, _np_version_under1p8
from pandas.core.types.cast import maybe_promote
from pandas.core.types.generic import (
from pandas.core.typed.cast import maybe_promote
from pandas.core.typed.generic import (
ABCSeries, ABCIndex,
ABCIndexClass, ABCCategorical)
from pandas.core.types.common import (
from pandas.core.typed.common import (
is_unsigned_integer_dtype, is_signed_integer_dtype,
is_integer_dtype, is_complex_dtype,
is_categorical_dtype, is_sparse,
Expand All @@ -26,7 +26,7 @@
_ensure_float64, _ensure_uint64,
_ensure_int64)
from pandas.compat.numpy import _np_version_under1p10
from pandas.core.types.missing import isnull
from pandas.core.typed.missing import isnull

import pandas.core.common as com
from pandas.compat import string_types
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np

from pandas.core.algorithms import factorize, unique, value_counts
from pandas.core.types.missing import isnull, notnull
from pandas.core.typed.missing import isnull, notnull
from pandas.core.categorical import Categorical
from pandas.core.groupby import Grouper
from pandas.formats.format import set_eng_float_format
Expand Down
8 changes: 4 additions & 4 deletions pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from pandas.compat import builtins
import numpy as np

from pandas.core.types.missing import isnull
from pandas.core.types.generic import ABCDataFrame, ABCSeries, ABCIndexClass
from pandas.core.types.common import is_object_dtype, is_list_like, is_scalar
from pandas.core.typed.missing import isnull
from pandas.core.typed.generic import ABCDataFrame, ABCSeries, ABCIndexClass
from pandas.core.typed.common import is_object_dtype, is_list_like, is_scalar
from pandas.util.validators import validate_bool_kwarg

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

from pandas.core.types.cast import is_nested_object
from pandas.core.typed.cast import is_nested_object
from pandas import Series
result = Series(results, index=keys, name=self.name)
if is_nested_object(result):
Expand Down
12 changes: 6 additions & 6 deletions pandas/core/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
from pandas.compat import u, lzip
from pandas._libs import lib, algos as libalgos

from pandas.core.types.generic import (
from pandas.core.typed.generic import (
ABCSeries, ABCIndexClass, ABCCategoricalIndex)
from pandas.core.types.missing import isnull, notnull
from pandas.core.types.cast import (
from pandas.core.typed.missing import isnull, notnull
from pandas.core.typed.cast import (
maybe_infer_to_datetimelike,
coerce_indexer_dtype)
from pandas.core.types.dtypes import CategoricalDtype
from pandas.core.types.common import (
from pandas.core.typed.dtypes import CategoricalDtype
from pandas.core.typed.common import (
_ensure_int64,
_ensure_object,
_ensure_platform_int,
Expand Down Expand Up @@ -1218,7 +1218,7 @@ def value_counts(self, dropna=True):
"""
from numpy import bincount
from pandas.core.types.missing import isnull
from pandas.core.typed.missing import isnull
from pandas.core.series import Series
from pandas.core.index import CategoricalIndex

Expand Down
14 changes: 7 additions & 7 deletions pandas/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
from pandas import compat
from pandas.compat import long, zip, iteritems
from pandas.core.config import get_option
from pandas.core.types.generic import ABCSeries
from pandas.core.types.common import _NS_DTYPE
from pandas.core.types.inference import _iterable_not_string
from pandas.core.types.missing import isnull
from pandas.core.typed.generic import ABCSeries
from pandas.core.typed.common import _NS_DTYPE
from pandas.core.typed.inference import _iterable_not_string
from pandas.core.typed.missing import isnull
from pandas.api import types
from pandas.core.types import common
from pandas.core.typed import common

# compat
from pandas.errors import ( # noqa
Expand Down Expand Up @@ -60,7 +60,7 @@ def wrapper(*args, **kwargs):
warnings.warn("pandas.core.common.{t} is deprecated. "
"These are not longer public API functions, "
"but can be imported from "
"pandas.core.types.common.{t} instead".format(t=t),
"pandas.core.typed.common.{t} instead".format(t=t),
DeprecationWarning, stacklevel=3)
return getattr(common, t)(*args, **kwargs)
return wrapper
Expand All @@ -73,7 +73,7 @@ def wrapper(*args, **kwargs):
def array_equivalent(*args, **kwargs):
warnings.warn("'pandas.core.common.array_equivalent' is deprecated and "
"is no longer public API", DeprecationWarning, stacklevel=2)
from pandas.core.types import missing
from pandas.core.typed import missing
return missing.array_equivalent(*args, **kwargs)


Expand Down
2 changes: 1 addition & 1 deletion pandas/core/config_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def mpl_style_cb(key):


def use_inf_as_null_cb(key):
from pandas.core.types.missing import _use_inf_as_null
from pandas.core.typed.missing import _use_inf_as_null
_use_inf_as_null(key)


Expand Down
6 changes: 3 additions & 3 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import numpy as np
import numpy.ma as ma

from pandas.core.types.cast import (
from pandas.core.typed.cast import (
maybe_upcast, infer_dtype_from_scalar,
maybe_cast_to_datetime,
maybe_infer_to_datetimelike,
Expand All @@ -33,7 +33,7 @@
coerce_to_dtypes,
maybe_upcast_putmask,
find_common_type)
from pandas.core.types.common import (
from pandas.core.typed.common import (
is_categorical_dtype,
is_object_dtype,
is_extension_type,
Expand All @@ -56,7 +56,7 @@
is_iterator,
is_sequence,
is_named_tuple)
from pandas.core.types.missing import isnull, notnull
from pandas.core.typed.missing import isnull, notnull

from pandas.core.common import (_try_sort,
_default_index,
Expand Down
8 changes: 4 additions & 4 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pandas as pd

from pandas._libs import tslib, lib
from pandas.core.types.common import (
from pandas.core.typed.common import (
_coerce_to_dtype,
_ensure_int64,
needs_i8_conversion,
Expand All @@ -24,9 +24,9 @@
is_list_like,
is_dict_like,
is_re_compilable)
from pandas.core.types.cast import maybe_promote, maybe_upcast_putmask
from pandas.core.types.missing import isnull, notnull
from pandas.core.types.generic import ABCSeries, ABCPanel
from pandas.core.typed.cast import maybe_promote, maybe_upcast_putmask
from pandas.core.typed.missing import isnull, notnull
from pandas.core.typed.generic import ABCSeries, ABCPanel

from pandas.core.common import (_values_from_object,
_maybe_box_datetimelike,
Expand Down
8 changes: 4 additions & 4 deletions pandas/core/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from pandas.compat.numpy import function as nv, _np_version_under1p8
from pandas.compat import set_function_name

from pandas.core.types.common import (
from pandas.core.typed.common import (
is_numeric_dtype,
is_timedelta64_dtype, is_datetime64_dtype,
is_categorical_dtype,
Expand All @@ -34,8 +34,8 @@
_ensure_object,
_ensure_categorical,
_ensure_float)
from pandas.core.types.cast import maybe_downcast_to_dtype
from pandas.core.types.missing import isnull, notnull, _maybe_fill
from pandas.core.typed.cast import maybe_downcast_to_dtype
from pandas.core.typed.missing import isnull, notnull, _maybe_fill

from pandas.core.common import (_values_from_object, AbstractMethodError,
_default_index)
Expand Down Expand Up @@ -4080,7 +4080,7 @@ def _apply_to_column_groupbys(self, func):
def count(self):
""" Compute count of group, excluding missing values """
from functools import partial
from pandas.core.types.missing import _isnull_ndarraylike as isnull
from pandas.core.typed.missing import _isnull_ndarraylike as isnull

data, _ = self._get_data_to_aggregate()
ids, _, ngroups = self.grouper.group_info
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import numpy as np
from pandas.compat import range, zip
import pandas.compat as compat
from pandas.core.types.generic import ABCDataFrame, ABCPanel, ABCSeries
from pandas.core.types.common import (
from pandas.core.typed.generic import ABCDataFrame, ABCPanel, ABCSeries
from pandas.core.typed.common import (
is_integer_dtype,
is_integer, is_float,
is_list_like,
Expand All @@ -15,7 +15,7 @@
is_sparse,
_is_unorderable_exception,
_ensure_platform_int)
from pandas.core.types.missing import isnull, _infer_fill_value
from pandas.core.typed.missing import isnull, _infer_fill_value

from pandas.core.index import Index, MultiIndex

Expand Down
12 changes: 6 additions & 6 deletions pandas/core/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

from pandas.core.base import PandasObject

from pandas.core.types.dtypes import (
from pandas.core.typed.dtypes import (
ExtensionDtype, DatetimeTZDtype,
CategoricalDtype)
from pandas.core.types.common import (
from pandas.core.typed.common import (
_TD_DTYPE, _NS_DTYPE,
_ensure_int64, _ensure_platform_int,
is_integer,
Expand All @@ -31,7 +31,7 @@
is_re_compilable,
is_scalar,
_get_dtype)
from pandas.core.types.cast import (
from pandas.core.typed.cast import (
maybe_downcast_to_dtype,
maybe_convert_string_to_object,
maybe_upcast,
Expand All @@ -41,13 +41,13 @@
maybe_convert_objects,
astype_nansafe,
find_common_type)
from pandas.core.types.missing import (
from pandas.core.typed.missing import (
isnull, array_equivalent,
_is_na_compat,
is_null_datelike_scalar)
import pandas.core.types.concat as _concat
import pandas.core.typed.concat as _concat

from pandas.core.types.generic import ABCSeries
from pandas.core.typed.generic import ABCSeries
from pandas.core.common import is_null_slice
import pandas.core.algorithms as algos

Expand Down
6 changes: 3 additions & 3 deletions pandas/core/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pandas._libs import algos, lib

from pandas.compat import range, string_types
from pandas.core.types.common import (
from pandas.core.typed.common import (
is_numeric_v_string_like,
is_float_dtype,
is_datetime64_dtype,
Expand All @@ -19,8 +19,8 @@
needs_i8_conversion,
_ensure_float64)

from pandas.core.types.cast import infer_dtype_from_array
from pandas.core.types.missing import isnull
from pandas.core.typed.cast import infer_dtype_from_array
from pandas.core.typed.missing import isnull


def mask_missing(arr, values_to_mask):
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/nanops.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from pandas import compat
from pandas._libs import tslib, algos, lib
from pandas.core.types.common import (
from pandas.core.typed.common import (
_get_dtype,
is_float, is_scalar,
is_integer, is_complex, is_float_dtype,
Expand All @@ -21,8 +21,8 @@
is_datetime64_dtype, is_timedelta64_dtype,
is_datetime_or_timedelta_dtype,
is_int_or_datetime_dtype, is_any_int_dtype)
from pandas.core.types.cast import _int64_max, maybe_upcast_putmask
from pandas.core.types.missing import isnull, notnull
from pandas.core.typed.cast import _int64_max, maybe_upcast_putmask
from pandas.core.typed.missing import isnull, notnull

from pandas.core.common import _values_from_object

Expand Down
8 changes: 4 additions & 4 deletions pandas/core/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

from pandas.errors import PerformanceWarning
from pandas.core.common import _values_from_object, _maybe_match_name
from pandas.core.types.missing import notnull, isnull
from pandas.core.types.common import (
from pandas.core.typed.missing import notnull, isnull
from pandas.core.typed.common import (
needs_i8_conversion,
is_datetimelike_v_numeric,
is_integer_dtype, is_categorical_dtype,
Expand All @@ -34,8 +34,8 @@
is_list_like,
is_scalar,
_ensure_object)
from pandas.core.types.cast import maybe_upcast_putmask, find_common_type
from pandas.core.types.generic import ABCSeries, ABCIndex, ABCPeriodIndex
from pandas.core.typed.cast import maybe_upcast_putmask, find_common_type
from pandas.core.typed.generic import ABCSeries, ABCIndex, ABCPeriodIndex

# -----------------------------------------------------------------------------
# Functions that add arithmetic methods to objects, given arithmetic factory
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

import numpy as np
import warnings
from pandas.core.types.cast import (
from pandas.core.typed.cast import (
infer_dtype_from_scalar,
maybe_cast_item)
from pandas.core.types.common import (
from pandas.core.typed.common import (
is_integer, is_list_like,
is_string_like, is_scalar)
from pandas.core.types.missing import notnull
from pandas.core.typed.missing import notnull

import pandas.computation.expressions as expressions
import pandas.core.common as com
Expand Down
Loading

0 comments on commit 387a9e6

Please sign in to comment.