I have a root file with one TTree and 57 branches. I would like to transform this to a root file with just 40 of those branches, with their names changed. I'm doing this with python.
What's the best way to go about this? Should I create a new root file using uproot.recreate? If so, how do I create a new root file with data from 40 of the old branches, with branch names changed?