From a6dbcea6c07a179b0a159f16d1811081e901e54d Mon Sep 17 00:00:00 2001 From: zethson Date: Tue, 7 May 2024 13:05:21 +0200 Subject: [PATCH] Silence pandas datetime warning Signed-off-by: zethson --- ehrapy/io/_read.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ehrapy/io/_read.py b/ehrapy/io/_read.py index 539ef17b..157938e9 100644 --- a/ehrapy/io/_read.py +++ b/ehrapy/io/_read.py @@ -591,7 +591,7 @@ def _prepare_dataframe(initial_df: pd.DataFrame, columns_obs_only, columns_x_onl no_datetime_object_col = [] for col in object_type_columns: try: - pd.to_datetime(initial_df[col], format="mixed") + pd.to_datetime(initial_df[col], format="mixed", utc=True) # only add to column_obs_only if not present already to avoid duplicates if col not in columns_obs_only: columns_obs_only.append(col)