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

Function rand_series_with_duplicate_datetimeindex

pandas/conftest.py:931–948  ·  view source on GitHub ↗

Fixture for Series with a DatetimeIndex that has duplicates.

()

Source from the content-addressed store, hash-verified

929
930@pytest.fixture
931def rand_series_with_duplicate_datetimeindex() -> Series:
932 """
933 Fixture for Series with a DatetimeIndex that has duplicates.
934 """
935 dates = [
936 datetime(2000, 1, 2),
937 datetime(2000, 1, 2),
938 datetime(2000, 1, 2),
939 datetime(2000, 1, 3),
940 datetime(2000, 1, 3),
941 datetime(2000, 1, 3),
942 datetime(2000, 1, 4),
943 datetime(2000, 1, 4),
944 datetime(2000, 1, 4),
945 datetime(2000, 1, 5),
946 ]
947
948 return Series(np.random.default_rng(2).standard_normal(len(dates)), index=dates)
949
950
951# ----------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

SeriesClass · 0.90

Tested by

no test coverage detected