@@ -833,9 +833,9 @@ cdef class _Period(object):
833833
834834 Parameters
835835 ----------
836- freq : string or DateOffset, default is 'D' if self.freq is week or
837- longer and 'S' otherwise
838- Target frequency
836+ freq : string or DateOffset
837+ Target frequency. Default is 'D' if self.freq is week or
838+ longer and 'S' otherwise
839839 how: str, default 'S' (start)
840840 'S', 'E'. Can be aliased as case insensitive
841841 'Start', 'Finish', 'Begin', 'End'
@@ -1067,46 +1067,48 @@ cdef class _Period(object):
10671067 | ``%% `` | A literal ``'%'`` character. | |
10681068 +-----------+--------------------------------+-------+
10691069
1070- .. note::
1071-
1072- (1)
1073- The ``%f `` directive is the same as ``%y `` if the frequency is
1074- not quarterly.
1075- Otherwise, it corresponds to the 'fiscal' year, as defined by
1076- the :attr:`qyear` attribute.
1077-
1078- (2)
1079- The ``%F `` directive is the same as ``%Y `` if the frequency is
1080- not quarterly.
1081- Otherwise, it corresponds to the 'fiscal' year, as defined by
1082- the :attr:`qyear` attribute.
1083-
1084- (3)
1085- The ``%p `` directive only affects the output hour field
1086- if the ``%I `` directive is used to parse the hour.
1087-
1088- (4)
1089- The range really is ``0`` to ``61``; this accounts for leap
1090- seconds and the (very rare) double leap seconds.
1091-
1092- (5)
1093- The ``%U `` and ``%W `` directives are only used in calculations
1094- when the day of the week and the year are specified.
1095-
1096- .. rubric:: Examples
1097-
1098- >>> a = Period(freq='Q@JUL', year=2006, quarter=1)
1099- >>> a.strftime('%F -Q%q ')
1100- '2006-Q1'
1101- >>> # Output the last month in the quarter of this date
1102- >>> a.strftime('%b -%Y ')
1103- 'Oct-2005'
1104- >>>
1105- >>> a = Period(freq='D', year=2001, month=1, day=1)
1106- >>> a.strftime('%d -%b -%Y ')
1107- '01-Jan-2006'
1108- >>> a.strftime('%b . %d , %Y was a %A ')
1109- 'Jan. 01, 2001 was a Monday'
1070+ Notes
1071+ -----
1072+
1073+ (1)
1074+ The ``%f `` directive is the same as ``%y `` if the frequency is
1075+ not quarterly.
1076+ Otherwise, it corresponds to the 'fiscal' year, as defined by
1077+ the :attr:`qyear` attribute.
1078+
1079+ (2)
1080+ The ``%F `` directive is the same as ``%Y `` if the frequency is
1081+ not quarterly.
1082+ Otherwise, it corresponds to the 'fiscal' year, as defined by
1083+ the :attr:`qyear` attribute.
1084+
1085+ (3)
1086+ The ``%p `` directive only affects the output hour field
1087+ if the ``%I `` directive is used to parse the hour.
1088+
1089+ (4)
1090+ The range really is ``0`` to ``61``; this accounts for leap
1091+ seconds and the (very rare) double leap seconds.
1092+
1093+ (5)
1094+ The ``%U `` and ``%W `` directives are only used in calculations
1095+ when the day of the week and the year are specified.
1096+
1097+ Examples
1098+ --------
1099+
1100+ >>> a = Period(freq='Q@JUL', year=2006, quarter=1)
1101+ >>> a.strftime('%F -Q%q ')
1102+ '2006-Q1'
1103+ >>> # Output the last month in the quarter of this date
1104+ >>> a.strftime('%b -%Y ')
1105+ 'Oct-2005'
1106+ >>>
1107+ >>> a = Period(freq='D', year=2001, month=1, day=1)
1108+ >>> a.strftime('%d -%b -%Y ')
1109+ '01-Jan-2006'
1110+ >>> a.strftime('%b . %d , %Y was a %A ')
1111+ 'Jan. 01, 2001 was a Monday'
11101112 """
11111113 base, mult = get_freq_code(self .freq)
11121114 return period_format(self .ordinal, base, fmt)
0 commit comments