Fake it till you make it — Making fake data in Python with Faker
Don’t let missing data stop you from getting started on a project. Faker is python package that makes generating fake data eaasy as ever. The package is flexible, easy to use, requires minimal start up time, and has a wide range of options to choose from when it comes to creating fake data fields.

Say you are creating an app and need user information. The data you want is not yet available, so you want to generate fake profiles for over 1000 users. Generating this fake data is as easy as the following:
from faker import Faker
import datetimedef generate_profile(fake: Faker):
start_date = datetime.date(2000, 1,1)
end_date = datetime.date(2015, 1,1)
profile = {
"name": fake.name(),
"birth_dt" : fake.date_between(start_date, end_date),
"zip_cd" : fake.zipcode(),
"city" : fake.city(),
"state" : fake.state(),
}
return profilenum_profiles = 1000
fake = Faker()
profiles = [generate_profile(fake) for i in range(num_profiles)]print(profiles[0])
{'name': 'Allison Matthews', 'birth_dt': datetime.date(2009, 3, 27), 'zip_cd': '73022', 'city': 'New Jeremyfurt', 'state': 'Washington'}This approach to create profile is scalable, runs in a second, and is easy to modify. Say your project expectations change and you want to add occupation to the above dataset. There is built in functionality in faker to add a fake job:
fake.job()If you are looking for additional options, they are available in the Faker documentation
https://faker.readthedocs.io/en/master/
Save the data
Once you have generated the fake data, you can write it out as a json for future use:
import json
with open('data/fake_data.json', 'w') as f:
json.dump(profiles, f)