Skip to content

Commit 1723d0e

Browse files
author
Mateusz Górski
committed
Change construction of "expected" for better readibility
1 parent 63156b3 commit 1723d0e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/tests/indexes/datetimes/test_datetime.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,8 @@ def test_index_map(self, name):
466466
a = pd.Series(np.arange(count), index=index)
467467
a.index = a.index.map(lambda x: (x.year, x.month))
468468

469-
exp_index = pd.MultiIndex.from_arrays(
470-
[[2018 for i in range(count)], [i for i in range(1, count + 1)]],
471-
names=[name, name],
469+
exp_index = pd.MultiIndex.from_product(
470+
((2018,), range(1, 7)), names=[name, name]
472471
)
473472
expected = pd.Series(np.arange(count), index=exp_index)
474473

0 commit comments

Comments
 (0)