Last active
January 20, 2025 10:26
-
-
Save alonsoir/9507cc7382845e9b07c222aa1c3b50ae to your computer and use it in GitHub Desktop.
generando datos random...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from faker import Faker | |
import random | |
fake = Faker() | |
def generate_fake_data(num_entries=10): | |
data = [] | |
for _ in range(num_entries): | |
entry = { | |
"Name": fake.name(), | |
"Address": fake.address(), | |
"Email": fake.email(), | |
"Phone Number": fake.phone_number(), | |
"Date of Birth": fake.date_of_birth(minimum_age=18, maximum_age=65).strftime("%Y-%m-%d"), | |
"Random Number": random.randint(1, 100), | |
"Job Title": fake.job(), | |
"Company": fake.company(), | |
"Lorem Ipsum Text": fake.text(), | |
} | |
data.append(entry) | |
return pd.DataFrame(data) | |
if __name__ == "__main__": | |
num_entries = 10 # You can adjust the number of entries you want to generate | |
fake_data_df = generate_fake_data(num_entries) | |
# Mostrar todas las columnas y ajustar el ancho máximo | |
pd.set_option("display.max_columns", None) # Muestra todas las columnas | |
pd.set_option("display.width", 1000) # Ajusta el ancho máximo para evitar saltos de línea | |
print(fake_data_df) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/aironman/Library/Caches/pypoetry/virtualenvs/attendance-system-SYPtwedO-py3.10/bin/python3.10 /Users/aironman/git/attendance_system/fucking_faker.py | |
Name Address Email Phone Number Date of Birth Random Number Job Title Company Lorem Ipsum Text | |
0 Jennifer Weiss 74848 Davenport Drive\nPort Jared, IN 70252 [email protected] (405)694-4850x028 1969-08-23 14 Maintenance engineer Carroll-Mason Popular structure low across. Production indic... | |
1 Andrew Ellis 1770 Bradley Junctions Suite 652\nHesterfort, ... [email protected] +1-214-883-9117 1976-11-28 78 Electronics engineer Orr Ltd Conference simply trip fly fight environment. ... | |
2 Jerry Green 0588 Martinez Neck\nSouth Josephfort, NE 69515 [email protected] +1-562-735-8466x300 1975-07-11 83 Accountant, chartered management Ford, Stokes and Gross Blood serve should kitchen every until. Trial ... | |
3 Richard Gibson 870 Benjamin Park Apt. 740\nLindafort, NE 90105 [email protected] (856)758-5465 1973-09-18 97 Sports development officer Jones and Sons Effect specific determine too.\nReal later lis... | |
4 Edward Roach 51978 Robert River\nOneillbury, VT 89976 [email protected] 001-784-812-1987x432 1962-05-25 7 Higher education lecturer Sanders, Novak and Shelton Pressure store quality return space movement g... | |
5 Michael Davis 5376 Jennifer Park\nSouth Joshua, IA 56830 [email protected] 748-928-5202x1854 1979-09-03 65 Database administrator Reid, Martin and Kaiser Somebody able quality that should right bag. R... | |
6 Dale Sullivan 56479 Elliott Cliff\nNorth Megan, LA 09667 [email protected] 001-933-800-7132x0564 1979-02-24 21 Television/film/video producer Gibbs PLC Long letter chair describe gun new read. Away ... | |
7 Mackenzie Bryant 77928 Anthony Village\nJacksonmouth, MT 86579 [email protected] (938)638-9766 1988-10-14 54 Engineer, site Rodriguez Group Both right father through leader PM. Break how... | |
8 Sarah Ortiz 875 Hawkins Junction Apt. 552\nJonesstad, AZ 0... [email protected] 001-779-756-2512x6369 2006-04-22 89 Site engineer Murphy-Warner Cultural employee play ago. I only office.\nLe... | |
9 Kevin Wade 5081 Stephanie Street Suite 402\nLake Ryanfort... [email protected] (299)285-9393x6057 1967-04-06 48 Armed forces technical officer Anderson-Howe You glass trip write marriage owner.\nBed comm... | |
Process finished with exit code 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment