Skip to content
Snippets Groups Projects
Commit 484ec7b9 authored by David Schäfer's avatar David Schäfer
Browse files

[FIX] masking='none' resulted in an additional history column for all flags

parent d90f933a
No related branches found
No related tags found
No related merge requests found
Pipeline #44676 passed with stage
in 2 minutes and 8 seconds
......@@ -342,6 +342,8 @@ def _restoreFlags(flags: Flags, old_state: CallState):
columns = pd.Index([old_state.field])
for col in columns.union(new_columns):
# if old_state.func_name == "breaks.flagMissing" and old_state.field == "H1_Voltage":
# import ipdb; ipdb.set_trace()
if col not in out: # ensure existence
out.history[col] = History(index=flags.history[col].index)
......@@ -351,9 +353,7 @@ def _restoreFlags(flags: Flags, old_state: CallState):
# We only want to add new columns, that were appended during the last function
# call. If no such columns exist, we end up with an empty new_history.
start = 0
if col in old_history.columns:
start = len(old_history.columns)
start = len(old_history.columns)
new_history = _sliceHistory(new_history, slice(start, None))
# NOTE:
......
......@@ -367,7 +367,7 @@ def plot(
data=data,
field=field,
flags=flags,
level=kwargs.get('flag', BAD),
level=kwargs.get("flag", BAD),
max_gap=max_gap,
stats=stats,
plot_kwargs=plot_kwargs,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment