hi-primus / optimus

:truck: Agile Data Preparation Workflows made easy with Pandas, Dask, cuDF, Dask-cuDF, Vaex and PySpark

Home Page:https://hi-optimus.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEA] Implement Optimus parser

argenisleon opened this issue · comments

For convenience, we want to implement a parser that lets the user create and string expression that will be executed inside a UDF function.

For example, a user could write

expr = "SQRT('col_name_1') + SQRT('col_name_2') + 100

This will be parsed to

expr = "op.sqrt(df['col_name_1']) + op.sqrt('df['col_name_2']) + 100

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.99. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

To use the parser

from optimus.expression import Parser
p = Parser()
p.parse(SQRT("col_name"))