MCPcopy
hub / github.com/pandas-dev/pandas / test_order_of_appearance_dt64tz

Method test_order_of_appearance_dt64tz

pandas/tests/test_algos.py:799–810  ·  view source on GitHub ↗
(self, unit)

Source from the content-addressed store, hash-verified

797 tm.assert_numpy_array_equal(result, expected)
798
799 def test_order_of_appearance_dt64tz(self, unit):
800 dti = DatetimeIndex(
801 [
802 Timestamp("20160101", tz="US/Eastern"),
803 Timestamp("20160101", tz="US/Eastern"),
804 ]
805 ).as_unit(unit)
806 result = pd.unique(dti)
807 expected = DatetimeIndex(
808 ["2016-01-01 00:00:00"], dtype=f"datetime64[{unit}, US/Eastern]", freq=None
809 )
810 tm.assert_index_equal(result, expected)
811
812 @pytest.mark.parametrize(
813 "arg ,expected",

Callers

nothing calls this directly

Calls 3

DatetimeIndexClass · 0.90
as_unitMethod · 0.45
uniqueMethod · 0.45

Tested by

no test coverage detected