How to use convert with custom function and reference row
See original GitHub issueWould it be possible to get an example placed in the documentation of using convert with a custom function that has reference to the row? I assume something like this should work?
table = [[a,b,c], [1,2,3]]
def my_func(row):
return row['b'] + row['c']
etl.convert(table, 'a', my_func)
# [[a,b,c], [5,2,3]]
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Using custom functions in Power Query - Microsoft Learn
Create a custom function from a table reference · Applying transformations to a sample query · Invoke a custom function as a new...
Read more >Easily Create Your Own Custom Functions in 3 Easy Steps
A Power Query Custom Function is simply a query that is run by other queries. We're going to create a custom function using...
Read more >Writing a custom function to convert class of variables in a ...
Here's an approach leveraging across and cur_column : library(dplyr) #version >= 1.0.0 df_1 %>% mutate(across(any_of(df_2$var_name), ...
Read more >Custom Functions in Google Sheets | Apps Script
Using a custom function · Click the cell where you want to use the function. · Type an equals sign ( = )...
Read more >How to use and store custom functions in Excel - Ablebits
Add the workbook name to the function · Store all the UDFs in one common file · Create an Excel add-in file.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hey @carlcorder ,
you’re right about that. It works when I change the signature of the function.
thanks for help 😃
Hey Javidy, my hunch is that
my_func
is not getting called. I think the issue here is that the signature of the function needs to bedef my_func(val, row):
?