(unit)
| 456 | |
| 457 | |
| 458 | def test_map_box_dt64tz(unit): |
| 459 | vals = [ |
| 460 | pd.Timestamp("2011-01-01", tz="US/Eastern"), |
| 461 | pd.Timestamp("2011-01-02", tz="US/Eastern"), |
| 462 | ] |
| 463 | ser = Series(vals).dt.as_unit(unit) |
| 464 | assert ser.dtype == f"datetime64[{unit}, US/Eastern]" |
| 465 | res = ser.map(lambda x: f"{type(x).__name__}_{x.day}_{x.tz}") |
| 466 | exp = Series(["Timestamp_1_US/Eastern", "Timestamp_2_US/Eastern"]) |
| 467 | tm.assert_series_equal(res, exp) |
| 468 | |
| 469 | |
| 470 | def test_map_box_td64(unit): |