diff --git a/lisa/analysis/idle.py b/lisa/analysis/idle.py index 8a08b5a65c..e674cb1efe 100644 --- a/lisa/analysis/idle.py +++ b/lisa/analysis/idle.py @@ -64,7 +64,7 @@ def df_cpus_idle(self, cpus=None): # The event uses an unsigned int even though the kernel uses -1, so use # -1 to avoid being tied to the event field type size non_idle = (2 ** 32) -1 - df['state'].replace(non_idle, -1, inplace=True) + df['state'] = df['state'].replace(non_idle, -1) return df @TraceAnalysisBase.cache diff --git a/lisa/analysis/tasks.py b/lisa/analysis/tasks.py index a0daaeab02..a94fab9d17 100644 --- a/lisa/analysis/tasks.py +++ b/lisa/analysis/tasks.py @@ -730,7 +730,7 @@ def f(state): df_add_delta(df, col='duration', inplace=True) if not np.isnan(preempted_value): - df['active'].fillna(preempted_value, inplace=True) + df['active'] = df['active'].fillna(preempted_value) # Merge consecutive activations' duration. They could have been # split in two by a bit of preemption, and we don't want that to @@ -747,8 +747,7 @@ def f(state): sleep = sleep.reindex(active.index, method='bfill') duty_cycle = active / (active + sleep) - df['duty_cycle'] = duty_cycle - df['duty_cycle'].ffill(inplace=True) + df['duty_cycle'] = duty_cycle.ffill() return df diff --git a/lisa/datautils.py b/lisa/datautils.py index 029196c9b2..fdd471fc8e 100644 --- a/lisa/datautils.py +++ b/lisa/datautils.py @@ -1446,7 +1446,7 @@ def df_combine_duplicates(df, func, output_col, cols=None, all_col=True, prune=T except KeyError: pass else: - init_df[output_col].fillna(fill, inplace=True) + init_df[output_col] = df[output_col].fillna(fill) if prune: # Only keep the first row of each duplicate run diff --git a/lisa/pelt.py b/lisa/pelt.py index 915329003e..dc87356710 100644 --- a/lisa/pelt.py +++ b/lisa/pelt.py @@ -93,7 +93,7 @@ def simulate_pelt(activations, init=0, index=None, clock=None, capacity=None, wi df = pd.DataFrame({'activations': activations}) if capacity is not None: df['rel_capacity'] = capacity.reindex(df.index, method='ffill') / scale - df['rel_capacity'].bfill(inplace=True) + df['rel_capacity'] = df['rel_capacity'].bfill() if clock is None: # If we have the CPU capacity at hand, we can make a fake PELT clock diff --git a/lisa/stats.py b/lisa/stats.py index 18644863e1..b36d1a4291 100644 --- a/lisa/stats.py +++ b/lisa/stats.py @@ -795,7 +795,7 @@ def _df_stats(self): unit_col = self._unit_col default_unit = '' if unit_col in df: - df[unit_col].fillna(default_unit, inplace=True) + df[unit_col] = df[unit_col].fillna(default_unit) else: df[unit_col] = default_unit