I have a dataframe with a datetime column where the times are quite randomly spaced. They are usually spaced with a frequency of ~1 min, but sometimes there is a gap for a day or more (but no empty rows). I need to add these rows (with a frequency of 1 minute) where the diff of the datetime column is larger than a certain value.
I can only find answers rewriting the index (with reindex
), but I can't do that as the points aren't evenly spaced.