Python date intervals to csv