From 51cccc67a96e64993e3fcb5cba4dcac318821bbc Mon Sep 17 00:00:00 2001 From: Eshwen Date: Fri, 6 Nov 2020 14:53:22 +0000 Subject: [PATCH] Making engine for querying more robust in case numexpr isn't installed --- fast_plotter/postproc/functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fast_plotter/postproc/functions.py b/fast_plotter/postproc/functions.py index c408988..86d31e3 100644 --- a/fast_plotter/postproc/functions.py +++ b/fast_plotter/postproc/functions.py @@ -29,7 +29,7 @@ def __call__(self, row): def handle_one_df(df, query=None, replacements=[], - combine_dims=[], combine_dims_ignore=None, combine_delim="__", engine_query="numexpr"): + combine_dims=[], combine_dims_ignore=None, combine_delim="__", engine_query=None): if query: df.query(query, inplace=True, engine=engine_query) if df.empty: @@ -51,7 +51,7 @@ def handle_one_df(df, query=None, replacements=[], return df -def query(df, query, engine_query="numexpr"): +def query(df, query, engine_query=None): """ Keep only rows that satisfy requirements of the query string, See: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.query.html