Hi Guys,
Could someone help me, please?
I have a function with two dataframes (df1 and df2) as input that filter df1 based on a column that contains unique identifiers (IDs) and creates a subdataframe, makes a series of analyses and return 0 or 1 per each ID with a for loop. My issue is that the execution time and allocations increase exponentially with more IDs. It looks like the problem is that all subdataframes created with the filter are saved when they should be overwritten. How can I overwrite the subdataframes made in the function?
The code is in the topic Increase performance in string comparison with sub-dataframes or sub-arrays - #6 by bojusemo , and correspond to the sections “Filter a pre-allocating the array a” and “Analysis of potential a”