Skip to content

Commit

Permalink
CLN import from pandas.core.arrays when possible (#23193)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinZhengBC authored and TomAugspurger committed Oct 17, 2018
1 parent cd863d3 commit d7d0ba2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ def _add_delta(self, delta):
The result's name is set outside of _add_delta by the calling
method (__add__ or __sub__)
"""
from pandas.core.arrays.timedeltas import TimedeltaArrayMixin
from pandas.core.arrays import TimedeltaArrayMixin

if isinstance(delta, (Tick, timedelta, np.timedelta64)):
new_values = self._add_delta_td(delta)
Expand Down Expand Up @@ -803,7 +803,7 @@ def to_period(self, freq=None):
pandas.PeriodIndex: Immutable ndarray holding ordinal values
pandas.DatetimeIndex.to_pydatetime: Return DatetimeIndex as object
"""
from pandas.core.arrays.period import PeriodArrayMixin
from pandas.core.arrays import PeriodArrayMixin

if self.tz is not None:
warnings.warn("Converting to PeriodArray/Index representation "
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/arrays/period.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def to_timestamp(self, freq=None, how='start'):
-------
DatetimeArray/Index
"""
from pandas.core.arrays.datetimes import DatetimeArrayMixin
from pandas.core.arrays import DatetimeArrayMixin

how = libperiod._validate_end_alias(how)

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from pandas.core.dtypes.cast import maybe_downcast_to_dtype
from pandas.core.base import SpecificationError, DataError
from pandas.core.index import Index, MultiIndex, CategoricalIndex
from pandas.core.arrays.categorical import Categorical
from pandas.core.arrays import Categorical
from pandas.core.internals import BlockManager, make_block
from pandas.compat.numpy import _np_version_under1p13

Expand Down
6 changes: 3 additions & 3 deletions pandas/tests/arrays/test_datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import pandas as pd
import pandas.util.testing as tm

from pandas.core.arrays.datetimes import DatetimeArrayMixin
from pandas.core.arrays.timedeltas import TimedeltaArrayMixin
from pandas.core.arrays.period import PeriodArrayMixin
from pandas.core.arrays import (DatetimeArrayMixin,
TimedeltaArrayMixin,
PeriodArrayMixin)


# TODO: more freq variants
Expand Down

0 comments on commit d7d0ba2

Please sign in to comment.