|
8 | 8 | from pandas._libs import iNaT, lib
|
9 | 9 |
|
10 | 10 | from pandas.core.dtypes.common import is_categorical_dtype, is_datetime64tz_dtype
|
11 |
| -from pandas.core.dtypes.dtypes import ( |
12 |
| - CategoricalDtype, |
13 |
| - DatetimeTZDtype, |
14 |
| - IntervalDtype, |
15 |
| - PeriodDtype, |
16 |
| -) |
| 11 | +from pandas.core.dtypes.dtypes import CategoricalDtype |
17 | 12 |
|
18 | 13 | import pandas as pd
|
19 | 14 | from pandas import (
|
20 | 15 | Categorical,
|
21 | 16 | DataFrame,
|
22 | 17 | Index,
|
23 |
| - Interval, |
24 | 18 | IntervalIndex,
|
25 | 19 | MultiIndex,
|
26 | 20 | NaT,
|
27 |
| - Period, |
28 | 21 | Series,
|
29 | 22 | Timestamp,
|
30 | 23 | date_range,
|
@@ -1082,26 +1075,6 @@ def test_constructor_dict_order(self):
|
1082 | 1075 | expected = Series([1, 0, 2], index=list("bac"))
|
1083 | 1076 | tm.assert_series_equal(result, expected)
|
1084 | 1077 |
|
1085 |
| - @pytest.mark.parametrize( |
1086 |
| - "data,dtype", |
1087 |
| - [ |
1088 |
| - (Period("2020-01"), PeriodDtype("M")), |
1089 |
| - (Interval(left=0, right=5), IntervalDtype("int64")), |
1090 |
| - ( |
1091 |
| - Timestamp("2011-01-01", tz="US/Eastern"), |
1092 |
| - DatetimeTZDtype(tz="US/Eastern"), |
1093 |
| - ), |
1094 |
| - ], |
1095 |
| - ) |
1096 |
| - def test_constructor_dict_extension(self, data, dtype): |
1097 |
| - d = {"a": data} |
1098 |
| - result = Series(d, index=["a"]) |
1099 |
| - expected = Series(data, index=["a"], dtype=dtype) |
1100 |
| - |
1101 |
| - assert result.dtype == dtype |
1102 |
| - |
1103 |
| - tm.assert_series_equal(result, expected) |
1104 |
| - |
1105 | 1078 | @pytest.mark.parametrize("value", [2, np.nan, None, float("nan")])
|
1106 | 1079 | def test_constructor_dict_nan_key(self, value):
|
1107 | 1080 | # GH 18480
|
@@ -1491,13 +1464,3 @@ def test_constructor_sparse_datetime64(self, values):
|
1491 | 1464 | arr = pd.arrays.SparseArray(values, dtype=dtype)
|
1492 | 1465 | expected = pd.Series(arr)
|
1493 | 1466 | tm.assert_series_equal(result, expected)
|
1494 |
| - |
1495 |
| - def test_construction_from_ordered_collection(self): |
1496 |
| - # https://github.com/pandas-dev/pandas/issues/36044 |
1497 |
| - result = Series({"a": 1, "b": 2}.keys()) |
1498 |
| - expected = Series(["a", "b"]) |
1499 |
| - tm.assert_series_equal(result, expected) |
1500 |
| - |
1501 |
| - result = Series({"a": 1, "b": 2}.values()) |
1502 |
| - expected = Series([1, 2]) |
1503 |
| - tm.assert_series_equal(result, expected) |
0 commit comments