Hi,
The following evaluates False when I'd expect it to evaluate True.
import pandas as pd
import numpy as np
df=pd.DataFrame({'val':[1,2,3]})
print(df.eval('@fruit=="apple"',local_dict={'fruit':'apple'}))
This works as expected
df=pd.DataFrame({'val':[1,2,3]})
print(df.eval('val>@x',local_dict={'x':2}))
As does this:
df=pd.DataFrame({'val':[1,2,3]})
print(df.eval('@fruit',local_dict={'fruit':'apple'}))
I was hoping to utilize the '.attrs' property of dataframes and the 'local_dict' feature of df.eval to minimize the memory footprint of my analysis.
Thanks,