Simplier way to get full statistics of a RVec branch using RDataFrame?

Hi all,

I am currently doing something following:

import ROOT
import numpy as np
import scipy

df = ROOT.RDataFrame(10000000)
coordDefineCode = '''
    ROOT::RVecD {0}(len);
    std::transform({0}.begin(), {0}.end(), {0}.begin(), [](double){{return gRandom->Uniform(-1.0, 1.0);}});
    return {0};
'''
d = df.Define("len", "gRandom->Uniform(0, 31337)")\
      .Define("x", coordDefineCode.format("x"))\

# Now I want to get full and detailed overview of this variable:
arrays = df.AsNumpy()
data = np.concatenate([np.array(rvec) for rvec in arrays["x"]])

mean = np.mean(data)
median = np.median(data)
std = np.std(data)
skewness = scipy.stats.skew(data)
kurtosis = scipy.stats.kurtosis(data)
min_val = np.min(data)
quantiles = np.quantile(data, [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])
max_val = np.max(data)

My question is, what would be alternative code using RDataFrame for this?
Converting to numpy and calculating everything in python seems like not the most optimal thing to do here. However, I am not sure if it is possible to acheive everything that I want using ROOT…

Thanks!