check missing dates in pandas 1

check missing dates in pandas

pd.date_range(start = '2013-01-19', end = '2018-01-29' ).difference(df.index)

Here is what the above code is Doing:
1. We are creating a date range from 2013-01-19 to 2018-01-29.
2. We are then finding the difference between the date range and the index of the dataframe.
3. The difference is the missing dates.

Similar Posts