diff --git a/fmriprep/interfaces/confounds.py b/fmriprep/interfaces/confounds.py index 03d842523..155e12e54 100644 --- a/fmriprep/interfaces/confounds.py +++ b/fmriprep/interfaces/confounds.py @@ -555,12 +555,7 @@ def _run_interface(self, runtime): else: data = dataframe[headers] - colnames = data.columns.ravel().tolist() - - for name, newname in list(names.items()): - colnames[colnames.index(name)] = newname - - data.columns = colnames + data = data.rename(columns=names) fig = fMRIPlot( dataset,