gordonwatts / BDTTrainingAnalysisLanguage

Pull from ATLAS EXOT 15 Derivation, columnar data, and flat rootutples with RDF to scikitlearn in one nice fast swoop
0 stars 2 forks source link

Allow LINQ operators in the lambda functions #34

Closed gordonwatts closed 5 years ago

gordonwatts commented 5 years ago

When one writes code like the following:

training_df = events \
    .SelectMany('lambda e: e.Jets("AntiKt4EMTopoJets").Select(lambda j1: j1)') \
    .Select('lambda j: j.pt()') \
    .AsPandasDF(columns=['JetPt']).value()

The Select in the second line looks like a function call, not a LINQ operator. We need to capture this and transform the function.