lux icon indicating copy to clipboard operation
lux copied to clipboard

[BUG] Inequality Filter Shorthand Parsing Error

Open dorisjlee opened this issue 3 years ago • 0 comments

Description When an inequality filter is specified, the parsing causes an error since the inequality is not detected and input is assumed as an attribute.

To Reproduce

df = pd.read_csv("https://raw.githubusercontent.com/lux-org/lux-datasets/master/data/employee.csv")
df.intent=["Age>30"]

image

Expected behavior The shorthand "Age>30" should be parsed into the clause below, which runs correctly.

df = pd.read_csv("https://raw.githubusercontent.com/lux-org/lux-datasets/master/data/employee.csv")
df.intent=[lux.Clause(attribute="Age",filter_op=">",value=30)]

dorisjlee avatar Feb 26 '21 10:02 dorisjlee