Skip to content
Snippets Groups Projects
Commit 9af86511 authored by Patrick Ecker's avatar Patrick Ecker
Browse files

duplicated columns in df are removed now

parent 2431804b
Branches
No related tags found
1 merge request!63Low level cut study
......@@ -74,7 +74,9 @@ class MergeNTuplesTask(utilities.BaseOfflineTask):
assert os.path.splitext(p=self.input_dict[combo])[1] == ".root", os.path.splitext(p=self.input_dict[combo])
data_file = uproot.open(self.input_dict[combo])
tree = data_file[data_file.keys()[0]]
dfs.append(tree.pandas.df())
df = tree.pandas.df()
df = df.loc[:, ~df.columns.duplicated()]
dfs.append(df)
number_of_events += len(dfs[-1].index)
total_n_tuple = pd.concat(dfs, ignore_index=True, sort=False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment