@pytest.mark.parametrize('to_key', ['datetime64[ns]', 'datetime64[ns, UTC]', 'datetime64[ns, US/Eastern]'], indirect=True)
@pytest.mark.parametrize('from_key', ['datetime64[ns]', 'datetime64[ns, UTC]', 'datetime64[ns, US/Eastern]'], indirect=True)
def test_replace_series_datetime_datetime(self, how, to_key, from_key, replacer):
    index = pd.Index([3, 4], name='xyz')
    obj = pd.Series(self.rep[from_key], index=index, name='yyy')
    assert (obj.dtype == from_key)
    result = obj.replace(replacer)
    exp = pd.Series(self.rep[to_key], index=index, name='yyy')
    assert (exp.dtype == to_key)
    tm.assert_series_equal(result, exp)
@pytest.mark.parametrize('to_key', ['datetime64[ns]', 'datetime64[ns, UTC]', 'datetime64[ns, US/Eastern]'], indirect=True)
@pytest.mark.parametrize('from_key', ['datetime64[ns]', 'datetime64[ns, UTC]', 'datetime64[ns, US/Eastern]'], indirect=True)
def test_replace_series_datetime_datetime(self, how, to_key, from_key, replacer):
    index = pd.Index([3, 4], name='xyz')
    obj = pd.Series(self.rep[from_key], index=index, name='yyy')
    assert (obj.dtype == from_key)
    result = obj.replace(replacer)
    exp = pd.Series(self.rep[to_key], index=index, name='yyy')
    assert (exp.dtype == to_key)
    tm.assert_series_equal(result, exp)