From 6e9c3e29db60f80ab99c231bba3cf6664e847975 Mon Sep 17 00:00:00 2001 From: Natalia Mokeeva Date: Fri, 16 Feb 2024 19:41:07 +0100 Subject: [PATCH] add section raises to PeriodIndex docstring --- pandas/core/indexes/period.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/core/indexes/period.py b/pandas/core/indexes/period.py index 50c3b251170c2..4aee8293049f1 100644 --- a/pandas/core/indexes/period.py +++ b/pandas/core/indexes/period.py @@ -134,6 +134,12 @@ class PeriodIndex(DatetimeIndexOpsMixin): from_fields from_ordinals + Raises + ------ + ValueError + Passing the parameter data as a list without specifying either freq or + dtype will raise a ValueError: "freq not specified and cannot be inferred" + See Also -------- Index : The base pandas Index type.