import pytest from pandas import ( DatetimeIndex, Index, MultiIndex, Period, date_range, ) import pandas._testing as tm class TestMap: def test_map(self): rng = date_range("1/1/2000", periods=10) f = lambda x: x.strftime("%Y%m%d") result = rng.map(f) exp = Index([f(x) for x in rng], dtype="