Reputation: 105
In my program, I want the user to be able to pass a string as a condition. For example, if the user input is "col(X) | col(Y)", I would like this string to be the filter condition in the filter function of a Dataframe. So an example will be like this:
condition = "col(X) | col(Y)"
dataFrame.filter(condition)
I saw on the documentation that I need an Expr to pass in the filter, but how can I transform a string to an Expr?
Upvotes: 0
Views: 692