Relative Content

Tag Archive for pythonpandasdataframedatetime-series

How to handle duplicates using asfreq() function. Is there any other way to do this?

I have some hourly data on electricity generation from various sources in various countries. I download data from the ENTSO-E Transparency Platform website and found a problem with data inconsistency. For some data sets, the time series was interrupted for several hours because there were no appropriate rows for this data set on the source page – for less explained reasons. I solved this problem using the asfreq() method, which basically fills in the appropriate gaps with dashes and everything works :). This solved, for example, the problem of an hour being taken away due to daylight saving time (DST) and a dash is entered every hour 02:00:00 on the last Sunday in March.

How to handle duplicates using asfreq() function

I have some hourly data on electricity generation from various sources in various countries. I download data from the ENTSO-E Transparency Platform website and found a problem with data inconsistency. For some data sets, the time series was interrupted for several hours because there were no appropriate rows for this data set on the source page – for less explained reasons. I solved this problem using the asfreq() method, which basically fills in the appropriate gaps with dashes and everything works :). This solved, for example, the problem of an hour being taken away due to daylight saving time (DST) and a dash is entered every hour 02:00:00 on the last Sunday in March.