Logo

dev-resources.site

for different kinds of informations.

Generate 5000 Fake Female names of USA

Published at
9/17/2022
Categories
name
generator
faker
fake
Author
meetsohail
Categories
4 categories in total
name
open
generator
open
faker
open
fake
open
Author
10 person written this
meetsohail
open
Generate 5000 Fake Female names of USA

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!

Featured ones: