What I am trying to do: Group data based on time intervals (e.g., 15 days window) and perform some operations on dataframe using (pandas) UDFs. I don't know if there is a better/cleaner way to do it.
Below is the sample code that I tried and error message I am getting.
This throws following exception:
However, if I use builtin agg method then it works all fine. For example,