From 5d3bd12337026da9e775ff9c9671736778d8df5a Mon Sep 17 00:00:00 2001 From: arw2019 Date: Mon, 19 Oct 2020 14:25:05 +0000 Subject: [PATCH 1/2] DOC: update PeriodArray docstring --- pandas/core/arrays/period.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index ba2048a496ef8..574c395874c4a 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -67,7 +67,7 @@ class PeriodArray(PeriodMixin, dtl.DatelikeOps): """ Pandas ExtensionArray for storing Period data. - Users should use :func:`period_array` to create new instances. + Users should use :func:`period_range` to create new instances. Parameters ---------- @@ -97,7 +97,7 @@ class PeriodArray(PeriodMixin, dtl.DatelikeOps): See Also -------- - period_array : Create a new PeriodArray. + period_range: Create a fixed-frequency PeriodArray. PeriodIndex : Immutable Index for period data. Notes From 3e3622abcd92c532027421714a5d340470b193f8 Mon Sep 17 00:00:00 2001 From: arw2019 Date: Tue, 20 Oct 2020 06:32:52 +0000 Subject: [PATCH 2/2] feedback --- pandas/core/arrays/period.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index 574c395874c4a..c77350d5f54bf 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -68,6 +68,8 @@ class PeriodArray(PeriodMixin, dtl.DatelikeOps): Pandas ExtensionArray for storing Period data. Users should use :func:`period_range` to create new instances. + Alternatively, :func:`array` can be used to create new instances + from a sequence of Period scalars. Parameters ---------- @@ -97,8 +99,10 @@ class PeriodArray(PeriodMixin, dtl.DatelikeOps): See Also -------- - period_range: Create a fixed-frequency PeriodArray. + Period: Represents a period of time. PeriodIndex : Immutable Index for period data. + period_range: Create a fixed-frequency PeriodArray. + array: Construct a pandas array. Notes -----