from random import randint from faker import Faker from datetime import date import pandas as pd f = Faker() s_date = date(2018, 5, 1) e_date = date(2018, 5, 30) dict_data = {'date': [], 'email': [], 'money': []} for _date in pd.date_range(start = s_date, end = e_date): dict_data['date'].append(_date) dict_data['email'].append(f.email()) dict_data['money'].append(randint(1, 100) * 0.99) df = pd.DataFrame.from_dict(dict_data) df.to_csv('out.csv', index = 0)
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