I have a usecase where the i need to create a vectorized UDTF on a pandas dataframe. This dataframe can have different columns from time to time as it is preprocessed data.
I was looking at the example in https://docs.snowflake.com/en/developer-guide/udf/python/udf-python-tabular-vectorized#example-calculate-the-summary-statistic-for-each-column-in-the-partition
Here the the input variables are explicitly mentioned as summary_stats(id varchar, col1 float, col2 float, col3 float, col4 float, col5 float)
The question is, is there way to handle this situation where the input dataframe has variable number of columns and also can have of different datatypes? How can the same function above be modified when the input columns are not known before hand?
Thanks in advance.