Skip to content

Commit 730f9b6

Browse files
IHackPyTomAugspurger
authored andcommitted
DOC : Update the Period.second docstring (#20319)
1 parent 8d3dabb commit 730f9b6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

pandas/_libs/tslibs/period.pyx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,25 @@ cdef class _Period(object):
12951295

12961296
@property
12971297
def second(self):
1298+
"""
1299+
Get the second component of the Period.
1300+
1301+
Returns
1302+
-------
1303+
int
1304+
The second of the Period (ranges from 0 to 59).
1305+
1306+
See Also
1307+
--------
1308+
Period.hour : Get the hour component of the Period.
1309+
Period.minute : Get the minute component of the Period.
1310+
1311+
Examples
1312+
--------
1313+
>>> p = pd.Period("2018-03-11 13:03:12.050000")
1314+
>>> p.second
1315+
12
1316+
"""
12981317
base, mult = get_freq_code(self.freq)
12991318
return psecond(self.ordinal, base)
13001319

0 commit comments

Comments
 (0)