Last active
September 11, 2022 08:55
-
-
Save pierrelouisbescond/6634a5af3be3b726ff747192459541b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import math | |
# We create the DataFrame as a date range between 6/1/2020 (US format) and 6/2/2020 -1 | |
df = pd.DataFrame(index=pd.date_range(start='6/1/2020', end='6/2/2020', freq='min')[:-1]) | |
# We create an integer array from 0 to 1439 (= 24 hours x 60 minutes) | |
df["x"]=np.linspace(0, 24 * 60 - 1, 24 * 60, dtype=int) | |
df |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment