pandas.tseries.offsets.Week.rule_code#

Week.rule_code#

Return a string representing the base frequency.

This code is used internally to identify the frequency type and includes any anchoring information (e.g., day of week for Week offsets).

See also

tseries.offsets.Hour.name

Returns a string representing the base frequency of ‘h’.

tseries.offsets.Day.name

Returns a string representing the base frequency of ‘D’.

Examples

>>> pd.offsets.Hour().rule_code
'h'
>>> pd.offsets.Week(5).rule_code
'W'