axiacore / py-expression-eval

MIT License
149 stars 54 forks source link

Support date comparison in parser. #52

Open priyankpshah opened 4 years ago

priyankpshah commented 4 years ago

I calling following user defined functions from parser. def conditional_res(formula,res1,res2): res = pd.Series() res = np.where(formula,res1,res2) return res df['check']=parser.parse("conditional_res(Col1==Col2,'Yes','No')").evaluate(dct) Above code works fine with String and Number types but date type. Is there a way to add support for Date comparison?