Skip to content

Commit

Permalink
fix: ignore NA when casting to datetime (#1391)
Browse files Browse the repository at this point in the history
* fix: ignore NA when casting to datetime

* fix: ignore NA when casting to datetime
  • Loading branch information
aquemy authored Jul 19, 2023
1 parent 8e6cff4 commit 152fc7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ydata_profiling/model/typeset_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def string_is_numeric(series: pd.Series, state: dict, k: Settings) -> bool:

def string_to_datetime(series: pd.Series, state: dict) -> pd.Series:
if is_pandas_1():
return series.astype("datetime64")
return pd.to_datetime(series)
return pd.to_datetime(series, format="mixed")


Expand Down

0 comments on commit 152fc7f

Please sign in to comment.