Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions kats/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,11 @@ def __init__( # noqa C901
tz_nonexistent=tz_nonexistent,
)
# drop duplicate time stamps
df = df.drop_duplicates(subset=[self.time_col_name], keep="first")
logging.warning(
"Drop duplicates in the time series if timestamps are identical."
)
if len(df[self.time_col_name].unique())!= len(df[self.time_col_name]):
df = df.drop_duplicates(subset=[self.time_col_name], keep="first")
logging.warning(
"Drop duplicates in the time series if timestamps are identical."
)

# Sort by time
df = self._sort_by_time(sort_by_time=sort_by_time, df=df)
Expand Down