from datetime import date
from pandas import date_range
from uuid import uuid4
from random import randint
s_date = date(2019, 1, 1)
e_date = date(2019, 1, 30)
stats = {}
for d in date_range(start=s_date, end=e_date):
d = str(d.date())
stats[d] = {
'user_id': str(uuid4()),
'clicks': randint(0, 1000)
}
print(stats)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter