'fill blank datetime in dataframe with containing all data
I have multiple data which form is 'Date' and 'dvv (some values)'.
Most date columns are blank so when I plot them separately, they appear almost empty.
So I made a code which fill datetime.
date=envs.Date
date=pd.to_datetime(date)
envs=envs.set_index(date)
envs=envs.resample('D').first()
But, as below, the results becomes weird and the datetime counted even though there are more data after the date. (I tried to show you the screenshot directly but it was rejected..)
(The top part is original data and the bottom part is after resampling datetime.)
So could you please let me know the way to fill the datetime with containing all data?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
