pandas.Period.strftime
pandas 3.1.1 · Arrays, scalars, and data types · method
Format this period with formatting directives. This method is deprecated in pandas 3.1.1. Convert to a timestamp first when its start or end is the intended value.
Call syntax
Period.strftime(fmt)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
fmt |
Required Positional or keyword |
str or None |
Returns
str