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