mercredi 21 juin 2017

Pandas Series expand with filling random mean values

I am having temperature values, hourly, for the entire year (normally: 8783). Unfortunately, some values are missing, around 100, and from required 8783 I am having ~ 8688. The idea is to fulfill this pandas series till required 8783 rows (corresponding to the number of hours in that year) by randomly generating values (maybe with pd.reindex(method='nearest')) till the required total row shape 8783. Currently, all missing values are added at the end wich is not what I meant. Missing values are from the entire year, not from the last 4 days. How should I proceed to fulfill those values (spread randomly in a small group, best by 1 with step 500 and using nearest value for reference) in entire series?

Thanks in advance and may the force be with you!




Aucun commentaire:

Enregistrer un commentaire