I’m trying to swap the names of several columns in an RDataFrame to make the data consistent with the format that is expected by another script as the branch prefixes are defined the other way around. My first guess was to try
# rdf contains Dp_l1_P and Dp_l2_P
new_rdf = rdf.Alias('Dp_l1_P_bak', 'Dp_l1_P') \
.Alias('Dp_l1_P', 'Dp_l2_P') \
.Alias('Dp_l2_P', 'Dp_l1_P_bak')
but this doesn’t work due to the redefinition of Dp_l1_P. I guess this would need ROOT-10165.
Is there a way to do this? Or do I have to rename and write a temporary file without the original columns?