Generate 5000 Fake Female names of USA
Sohail Ahmed

Sohail Ahmed @meetsohail

About: SaaS CEO @ translateplus.io | Python Developer | Kubernetes (k8s) & Docker Architect | Reverse Engineering Specialist

Location:
Islamabad
Joined:
Jun 1, 2019

Generate 5000 Fake Female names of USA

Publish Date: Sep 17 '22
6 4

One of my friend was looking for multiple female names of USA, so his team can create accounts using those names on one of the website!

My friend was manually generating female names of USA using fakenamegenerator.com! That was hectic job for him and time consuming too.

He just contact me so i can generate using any script. I come up with an idea to generate using python library pip install faker, which is one of the best library to generate fake first name, last name, address etc within seconds!

I wrote a code of few lines, which helped him to generate as many names within a second and store them in to a CSV file!

from faker import Faker
import csv
fake = Faker('en_US')

header = ['firt_name', 'last_name']


with open('us_female.csv', 'w', encoding='UTF8', newline='') as file:
    writer = csv.writer(file)
    i = 0
    while i <5000:
        data = [fake.first_name_female(), fake.last_name_female()]
        writer.writerow(data)
        i = i + 1
Enter fullscreen mode Exit fullscreen mode

I am sharing this code with you guys, may be i will help any one like my friend!

Comments 4 total

  • José Pablo Ramírez Vargas
    José Pablo Ramírez VargasSep 18, 2022

    Want fake data? Mockaroo. Names, genders, birth dates, counties, ID's, and sooo many more.

    • Sohail Ahmed
      Sohail AhmedSep 18, 2022

      Wow Jose, You have shared wonderful website to generate fake data! How can we define location?

      • José Pablo Ramírez Vargas
        José Pablo Ramírez VargasSep 19, 2022

        When you are creating a schema, click a field's data type button. The Choose a Type dialog appears. Select Location. There are 14 different types of location data. Here's a screenshot:

        Coose a Type -> Location | Mockaroo.com

        • Sohail Ahmed
          Sohail AhmedSep 20, 2022

          Great Jose! Thank you for letting us know!

Add comment