import pandas as pd
import numpy as np
# Generate random DateTimeIndex with a lngth of 100 million consecutive milliseconds
np.random.seed(12345)
range = pd.date_range('2019-01-02 06:00', periods=100000000, freq='ms')
# Create dataframe
df = pd.DataFrame({ 'Timestamp': range, 'Column1': np.random.randn(len(range)) })
# Take a random sample of 250000 records to get data that looks more realistic
dfSampled = df.sample(frac=0.0025)
# Sort by the original index
dfSorted = dfSampled.sort_index()
display(dfSorted.shape)
pd.options.display.max_rows = 10
display(dfSorted)
dfSorted.to_csv("timeseriesdata_250k.csv", sep=';', encoding='utf-8', index=False)