From 28ae063b397b7d6815001bebe3e2b9ee8cd26937 Mon Sep 17 00:00:00 2001 From: Julien Barnier Date: Thu, 5 Sep 2024 11:40:35 +0200 Subject: [PATCH] Revert "fix: improve datetime detection in pandas dataframes" This reverts commit 602d2c12469ea34c4aea75dc1a44fb24ee2cc853. --- src/pyobsplot/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyobsplot/data.py b/src/pyobsplot/data.py index 43f62326..093b9181 100644 --- a/src/pyobsplot/data.py +++ b/src/pyobsplot/data.py @@ -60,7 +60,7 @@ def pd_to_arrow(df: pd.DataFrame) -> bytes: """ # Convert dates to timestamps for col in df.columns: - if pd.api.types.is_datetime64_any_dtype(df[col]): + if df[col].dtype == "object": try: df[col] = pd.to_datetime(df[col]) except ValueError: