From c4774ea08f13e7c946fd50f637daee35e8c855c2 Mon Sep 17 00:00:00 2001 From: HimanshuAwasthi95 Date: Tue, 13 Mar 2018 01:59:33 +0530 Subject: [PATCH 1/2] Update the pandas.Period.minute docstring --- pandas/_libs/tslibs/period.pyx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pandas/_libs/tslibs/period.pyx b/pandas/_libs/tslibs/period.pyx index 7763fe7b9008d..24c8ce1bb7cb9 100644 --- a/pandas/_libs/tslibs/period.pyx +++ b/pandas/_libs/tslibs/period.pyx @@ -1246,6 +1246,25 @@ cdef class _Period(object): @property def minute(self): + """ + Get minute of the hour component of the Period. + + Returns + ------- + int + The minute as an integer, between 0 and 59. + + See Also + -------- + Period.hour : Get the hour of the Period. + Period.second : Get the second of the Period. + + Examples + -------- + >>> p = pd.Period("2018-03-11 13:03:12.050000") + >>> p.minute + 3 + """ base, mult = get_freq_code(self.freq) return pminute(self.ordinal, base) From f5485c5cacf339d81d10fda04a5c1437b601a24f Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 12 Mar 2018 22:14:47 +0100 Subject: [PATCH 2/2] Update period.pyx --- pandas/_libs/tslibs/period.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/_libs/tslibs/period.pyx b/pandas/_libs/tslibs/period.pyx index 24c8ce1bb7cb9..e82a149f5745b 100644 --- a/pandas/_libs/tslibs/period.pyx +++ b/pandas/_libs/tslibs/period.pyx @@ -1256,8 +1256,8 @@ cdef class _Period(object): See Also -------- - Period.hour : Get the hour of the Period. - Period.second : Get the second of the Period. + Period.hour : Get the hour component of the Period. + Period.second : Get the second component of the Period. Examples --------