I have 2 Series of data:
- kWR - A Series list of data with numerical values
- COP_bins - A Series list that's grouped by bins with mean values
I would like to be able to get a 3rd list where we would have the same amount of items as in kWR list but the values correspond to kWR / bin value.
examples
# example of the first item in kWC list
-8.994642 # which comes from (-7.739641 / -1.255001)
# example of the last item in kWC list
44.571224 # which comes from (214.135716 / 4.804349)
I tried to do something like this, but it only works with hard coded number, not with a list :/
def get_COP_from_bin(kWR, COP_bins):
ix = COP_bins.keys().get_loc(kWR)
return COP_bins.values[ix]
list3 = kWR / get_COP_from_bin(kWR, COP_bins)
screenshot of my lists