I have two dataframes. dataframe1 has columns 'id' and 'jan', 'feb', 'mar', ..., 'nov', 'dec' (which are monthly sale predictions).
dataframe1:
dataframe2 has two columns: 'id' and 'date' (%d-%m-%Y).
I joined dataframe1 in dataframe2 by 'id' and generated a column 'daily_predictions'.
Problem: I want to break down such monthly predictions into daily predictions. However, I do not want to simply divide the month prediction by the number of days in the month, as I am looking for a distribution of values that links the daily predictions between months in a smoother way (not in a stepped fashion). The month average of such daily values should approximate (or be on) the month prediction.
Which (python/numpy/etc) function could I reference to do that? Is it possible to define a function that would do that or have I no choice but to divide the month prediction by the number of days in the month? Any suggestions are appreciated.
source https://stackoverflow.com/questions/75690056/splitting-monthly-values-into-daily-values-with-python

Comments
Post a Comment