effective_pandas_book icon indicating copy to clipboard operation
effective_pandas_book copied to clipboard

query engine fails p182

Open t-minor opened this issue 3 years ago • 0 comments

The code at the top of p182: (jb2 .query("team_size.isna()") .employment_status .value_counts(dropna=False) ) Can fail with:"TypeError: unhashable type: 'Series'" Running Python v3.9.7 and Pandas 1.3.4 with latest Anaconda install. Cause: 'numexpr' is default query engine if installed which appears so with Anaconda. See (ref). Solution: add engine='python' to query arguments.

t-minor avatar Apr 09 '22 01:04 t-minor