Same function- Input parameter change- st cache usage

hi all,

i have a function “test_func” which takes a list/data frame (df) as input and returns a data frame (modified_df) as output. I perform some complex transformation operations on that input dataframe (df) in this function(test_func) . So it takes some time during that process . So i implemented st.cache_data to prevent re executing the function after every rerun . There it worked well . But , now i need to reuse the same test_func with other input dataframes (df2,df3 etcc…) … Any optimal solution which i can implement so that i need to avoid code redundancy and should not compromise on time of execution .

Thank you

What do you think is wrong with your current solution?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.