Closed
Description
When using time series with millions of entries, lookup_linke_turbidity
becomes a bottleneck.
My first suggestion is to set interp_turbidity=False
by default.
My second suggestion is to to replace the fragment:
linke_turbidity = pd.DataFrame(time.month, index=time)
# apply monthly data
linke_turbidity = linke_turbidity.apply(lambda x: g[x[0]-1], axis=1)
with something like this:
months = time.month - 1
linke_turbidity = pd.DataFrame(g[months], index=time)
The interpolation could be sped up by expanding g
to 366 values and then indexing by dayofyear.
PS. I know this would make a perfect issue for my first pull request, but I'm afraid I'm not ready for that step! :)