-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataFrame distinct with multiple columns in the selector is not working if the name of the columns is variable #155
Comments
After many attempts I solved the issue using the javascript function constructor to create a function from a string
Now it works perfectly! Anyway, is there a more clever solution? |
That's strange. You shouldn't have to use a string. Are you able to publish a runnable code example in GitHub of the broken version? Then I can take a look at it. |
Hi, thanks for the reply. Here is an example code and how I solved the "issue"
Obviously this dataset doesn't make sense, it's just an example of what the algorithm should do. In fact, the algorithm then reads the join distinct count and goes on with its tasks. Another "issue" that I experienced is that before executing a join distinct I have to remove all the spaces from the column names. (This step is not present in the example above but I do it in my algorithm). Hope this example helps to clarify what I meant in the original question, anyway now I solved it using the javascript function constructor but I'd like to know if there is a more clever solution. |
Hey @marcodisa any chance you could fork the repo then get your code working as a failing test? Then I can work towards fixing the code for you and making your test pass. |
Hi, I'm not sure if this is the proper section to post this question,
First of all I’d like to congratulate you on the amazing work you’ve done with Data Forge npm and Data Forge Notebook. It’s a very extraordinary package and the Notebook is an extremely useful tool.
I’m seriously considering the upgrade to the pro version for my further projects.
Anyway, I’m stuck on a DataFrame distinct with two parameters in the selector.
If I run the code below it perfectly does what I want, “filiale” and “CAP” are two columns of df.
Actually I need to put the execution of the select distinct into a loop. I need the select distinct of every column with all the other columns, two columns at a time.
Long story short, I have a loop that in every iteration assigns the value to two variables serie1_name and serie2_name, in every iteration I correctly get my two variables like the code below.
Now I need the dataframe distinct to work with variable names not with the explicit names of the columns.
How the code below should be to work fine with variable column names?
I’ve tried many ways to make it work but I wasn’t able to handle it myself.
Is there something I’m missing out?
Can I get any hints or suggestions?
Thank you very much!
The text was updated successfully, but these errors were encountered: