Preview:
# initializing dates ranges
test_date1, test_date2 = date(2021, 6, 3), date(2023, 3, 3)
 
# initializing K
K = len(visits_content_users[user_id_column])
 
# getting days between dates
dates_bet = test_date2 - test_date1
total_days = dates_bet.days
 
res = []
for idx in range(K):
    random.seed(a=None)
     
    # getting random days
    randay = random.randrange(total_days)
     
    # getting random dates
    res.append(test_date1 + timedelta(days=randay))

visits_content_users['Dates'] = res
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