On Sun, Nov 6, 2016 at 5:32 PM, Nathaniel Smith <njs@pobox.com> wrote:
Filtering out a subset of rows from a data frame in pandas; 'height'
and 'age' refer to columns in the data frame (equivalent to
data_frame[data_frame["height"] > 100 and data_frame["age"] < 5], but
more ergonomic and faster (!)):

    data_frame.subset!(height > 100 and age < 5)

(IIRC pandas has at least experimented with various weird lambda hacks
for this kind of thing; not sure what the current status is.)

We abandoned the experiment because we couldn't make it work properly. There's no way to inject local variables in the appropriate scope around the lambda function:
https://github.com/pandas-dev/pandas/issues/13040