Skip to content

Commit b9607ce

Browse files
committed
Revert "added test for series construction via a period"
This reverts commit 0f48b5b.
1 parent c5f0454 commit b9607ce

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

pandas/tests/series/test_constructors.py

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,16 @@
88
from pandas._libs import iNaT, lib
99

1010
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
1712

1813
import pandas as pd
1914
from pandas import (
2015
Categorical,
2116
DataFrame,
2217
Index,
23-
Interval,
2418
IntervalIndex,
2519
MultiIndex,
2620
NaT,
27-
Period,
2821
Series,
2922
Timestamp,
3023
date_range,
@@ -1082,26 +1075,6 @@ def test_constructor_dict_order(self):
10821075
expected = Series([1, 0, 2], index=list("bac"))
10831076
tm.assert_series_equal(result, expected)
10841077

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-
11051078
@pytest.mark.parametrize("value", [2, np.nan, None, float("nan")])
11061079
def test_constructor_dict_nan_key(self, value):
11071080
# GH 18480
@@ -1491,13 +1464,3 @@ def test_constructor_sparse_datetime64(self, values):
14911464
arr = pd.arrays.SparseArray(values, dtype=dtype)
14921465
expected = pd.Series(arr)
14931466
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

Comments
 (0)