Skip to content

Commit 313eaa7

Browse files
fix: refactor datetime to remove deprecation warnings
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
1 parent 628d400 commit 313eaa7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/data_profiling/model/describe.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Organize the calculation of statistics for each series in this DataFrame."""
2-
from datetime import datetime
2+
from datetime import datetime, timezone
33
from typing import Any, Dict, Optional, Union
44

55
import pandas as pd
@@ -82,7 +82,7 @@ def describe(
8282
disable=not config.progress_bar,
8383
position=0,
8484
) as pbar:
85-
date_start = datetime.utcnow()
85+
date_start = datetime.now(timezone.utc)
8686

8787
# Variable-specific
8888
pbar.total += len(df.columns)
@@ -187,7 +187,7 @@ def describe(
187187

188188
pbar.set_postfix_str("Completed")
189189

190-
date_end = datetime.utcnow()
190+
date_end = datetime.now(timezone.utc)
191191

192192
analysis = BaseAnalysis(config.title, date_start, date_end)
193193
time_index_analysis = None

0 commit comments

Comments
 (0)