pub struct ToDatetimeOptions<'a> {
pub format: Option<&'a str>,
pub unit: Option<&'a str>,
pub utc: bool,
pub origin: Option<ToDatetimeOrigin<'a>>,
pub infer_mixed_timezone: bool,
pub mixed_tz_as_object: bool,
pub errors: DatetimeErrors,
pub dayfirst: bool,
}Fields§
§format: Option<&'a str>§unit: Option<&'a str>§utc: bool§origin: Option<ToDatetimeOrigin<'a>>§infer_mixed_timezone: bool§mixed_tz_as_object: boolWhen a string column mixes tz-naive and tz-aware values, pandas
read_csv(parse_dates=...) cannot unify them into datetime64[ns] and
keeps the column as object (a Series of mixed Timestamp objects). With
this set, FrankenPandas reproduces that: instead of coercing to
Datetime64, each value is normalized to its pandas str(Timestamp) form
(naive YYYY-MM-DD HH:MM:SS, aware ... +HH:MM). Used by CSV
parse_dates (br-frankenpandas-unz0t); off for bare to_datetime.
errors: DatetimeErrorspandas’ errors=: a string that does not parse, or does not match
the column’s one inferred format, is NaT (Coerce, the default
here, which read_csv(parse_dates=) relies on) or pandas’ ValueError
(Raise, what pd.to_datetime defaults to).
dayfirst: boolpandas’ dayfirst=: a numeric date’s two short slots read day then
month (see guess_day_month_format).