pandas.tseries.api.guess_datetime_format
pandas 3.1.1 · General functions · function
Try to infer a strptime-style format string from one date string.
Call syntax
api.guess_datetime_format(dt_str, dayfirst=False)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
dt_str |
Required Positional or keyword |
str |
dayfirst |
Optional Positional or keyword Default False |
bool Prefer the day before the month when interpreting ambiguous date text. |
Returns
str or None · ret