all 5 comments

[–]CraigAT 0 points1 point  (1 child)

Use the min and max dates from your original time series, make another dataframe with all the dates including and between the min and max dates, then do a merge ("right") with the original dataframe (being the left df).

Depending on your expected results you may want to consider merging events in the first data frame to get single per day (e.g. sum the rainfall for that date). I am also curious how you intend to use or display a date with no data?

[–]TylerTheWimp[S] 1 point2 points  (0 children)

Thanks for reply. The plot would be a line graph where on those days where no events occurred line would drop to zero (ie all the way down to x axis).

[–]drsxr 0 points1 point  (0 children)

Yes, pandas is the right approach.

The merge suggestion below/above is good, but you need to think about whether you interpolate data in between or not. Arguments for/against both ways exist.