Skip to content

Commit

Permalink
Merge pull request #7342 from pyramsd/reto#38
Browse files Browse the repository at this point in the history
#38 - python
  • Loading branch information
Roswell468 authored Dec 11, 2024
2 parents a54f8e9 + 347b4bf commit 0edbdf6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Roadmap/38 - MOUREDEV PRO/python/pyramsd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import pandas as pd

cvs_file = "D:\\Programacion\\registros.csv"

df = pd.read_csv(cvs_file)

print("Participantes:")
print(df)

emails_activos = df[df["status"] == "activo"][["id", "email"]]

ganadores = emails_activos.sample(3)
categorias = ["ganador de una suscripción", "ganador de un descuento", "ganador de un libro"]

print("\nGanadores:")

for index, (row, categoria) in enumerate(zip(ganadores.iterrows(), categorias)):
_, ganador = row
print(f"ID: {ganador['id']}, Email: {ganador['email']} -> {categoria}")

0 comments on commit 0edbdf6

Please sign in to comment.