pandas.Series.dt.strftime
pandas 3.1.1 · Series and accessors · method
Format a time value using strftime directives such as %Y-%m-%d. Period.strftime is deprecated in pandas 3.1.1.
Call syntax
Series.dt.strftime(date_format)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
date_format |
Required Positional or keyword |
str Specify datetime parsing or formatting directives such as "%Y-%m-%d". |
Returns
ndarray[object]