Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to add the number to email address in faker library in python?

import pandas as pd
import numpy as np
import os
import random
from faker import Faker

def faker_categorical(num=1, seed=None):
    np.random.seed(seed)
    fake.seed_instance(seed)
    output = []
    for x in range(num):
      gender = np.random.choice(["M", "F"], p=[0.5, 0.5])
      output.append(
        {
            "First name": fake.first_name_male() if gender=="M" else  
                                                 fake.first_name_female(),
            "Last name": fake.last_name(),
            "E-mail": fake.ascii_email(),  
        })
    return output
Comment

PREVIOUS NEXT
Code Example
Python :: typing return two objects 
Python :: pomodoro timer in python 
Python :: pubmed database python 
Python :: how write a date with th and nd in python 
Python :: seewave python 
Python :: does pygame work on python 3.10.1 
Python :: python check if division has remainder 
Python :: spearman correlation seaborn 
Python :: python regex get start end indices for searching word 
Python :: init matrix in numpy 
Python :: math is python 
Python :: how to get random images frrom quotefancy python 
Python :: pillow update image 
Python :: menampilkan data dalam range tertentu di python 
Python :: flask run function every minute 
Python :: add constant to all values of columns in dataframe python 
Python :: find low and high in string 
Python :: solving differential equations in python 
Python :: which company has the largest servers 
Python :: pyjone location 
Python :: dinoscape für pc 
Python :: python rename columns 
Python :: python - matching people based on city 
Python :: python selenium not returning correct source 
Python :: pandas resample fill missing values 
Python :: generate fibonacci series in python 
Python :: execute command from url.script 
Python :: parsing a file and adding a number at starting of every line sentence python 
Python :: json timestamp to date python 
Python :: How can I use Apache Spark with notebook in Anaconda 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =