|
55 | 55 | )
|
56 | 56 | from pandas.core.base import NoNewAttributesMixin, PandasObject, _shared_docs
|
57 | 57 | import pandas.core.common as com
|
| 58 | +from pandas.core.construction import extract_array, sanitize_array |
58 | 59 | from pandas.core.missing import interpolate_2d
|
59 | 60 | from pandas.core.sorting import nargsort
|
60 | 61 |
|
@@ -356,7 +357,6 @@ def __init__(
|
356 | 357 | values = maybe_infer_to_datetimelike(values, convert_dates=True)
|
357 | 358 | if not isinstance(values, np.ndarray):
|
358 | 359 | values = _convert_to_list_like(values)
|
359 |
| - from pandas.core.internals.construction import sanitize_array |
360 | 360 |
|
361 | 361 | # By convention, empty lists result in object dtype:
|
362 | 362 | if len(values) == 0:
|
@@ -2127,8 +2127,6 @@ def __setitem__(self, key, value):
|
2127 | 2127 | If (one or more) Value is not in categories or if a assigned
|
2128 | 2128 | `Categorical` does not have the same categories
|
2129 | 2129 | """
|
2130 |
| - from pandas.core.internals.arrays import extract_array |
2131 |
| - |
2132 | 2130 | value = extract_array(value, extract_numpy=True)
|
2133 | 2131 |
|
2134 | 2132 | # require identical categories set
|
@@ -2491,8 +2489,6 @@ def isin(self, values):
|
2491 | 2489 | >>> s.isin(['lama'])
|
2492 | 2490 | array([ True, False, True, False, True, False])
|
2493 | 2491 | """
|
2494 |
| - from pandas.core.internals.construction import sanitize_array |
2495 |
| - |
2496 | 2492 | if not is_list_like(values):
|
2497 | 2493 | raise TypeError(
|
2498 | 2494 | "only list-like objects are allowed to be passed"
|
|
0 commit comments