Time With Periods

Sat 17 May 2025

title: "Time With Periods" author: "Rj" date: 2019-04-20 description: "-" type: technical_note draft: false


import pandas as pd
times = pd.date_range('2000-01-01', periods=4)

print(times)
DatetimeIndex(['2000-01-01', '2000-01-02', '2000-01-03', '2000-01-04'], dtype='datetime64[ns]', freq='D')
for time in times:
    print(time)
2000-01-01 00:00:00
2000-01-02 00:00:00
2000-01-03 00:00:00
2000-01-04 00:00:00


Score: 5

Category: basics