I have a data frame consisting of 4 columns; date-time, wind speed, wind speed and wind direction. I need to bin the data in wind speed channels according to wind direction (12 sectors) and for every wind speed bin (1m/s, 2m/s, 3m/s and so on) and then calculate the mean of them. It would be easy if I needed to bin only according to wind direction or wind speed. I have found the answer for it:
binning data in python with scipy/numpy
However, I don't know how should I proceed binning according to two features.
I would appreciate it if someone has an idea.
Thank you very much in advance.