Skip to content

Commit 2d3d343

Browse files
author
Johannes Hentschel
committed
speedbump
1 parent ee402e3 commit 2d3d343

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ms3/utils/functions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5247,6 +5247,11 @@ def replace_index_by_intervals(
52475247
mask = (
52485248
df[position_col].notna() & (df[position_col] != "") & df[duration_col].notna()
52495249
)
5250+
if not mask.any():
5251+
logger.warning(
5252+
f"Either position_col {position_col!r} or duration_col {duration_col!r} are empty."
5253+
)
5254+
return df
52505255
n_dropped = (~mask).sum()
52515256
if filter_zero_duration:
52525257
mask &= df[duration_col] > 0

0 commit comments

Comments
 (0)