-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[DF] Add convenience function to describe the dataframe #7561
Copy link
Copy link
Closed
Labels
Description
Edit: I'll post the newest version always at the bottom of the feed. The interface here at the top is not state-of-the-art!
I've created this issue to discuss how the feature should look like, see the attached PR for the impl.
My current interface looks as follows:
import ROOT
df = ROOT.RDataFrame(1)\
.Define('myInt', 'int(1)')\
.Define('myFloat', 'float(1)')\
.Define('myVec', 'ROOT::RVec<float>({1, 2, 3})')
print(df.GetSchema())
# Prints you this:
'''
Column Type
------ ----
myInt int
myFloat float
myVec ROOT::VecOps::RVec<float>
'''Do we like the name of the function?Describe is betterDo we like that it returns a string rather than printing to stdout?We like strings!Should we add a header to the table?Edit: Done, see above!Should we add any other information (seeYes, see belowTTree::Print)?
Reactions are currently unavailable