DEV Community

loading...

Discussion on: Automating birthday wishes using Python

Collapse
hernancopello profile image
Hernan Copello

awesome, is there any way you can use pandas to import specific excel rows?

lets say you have a clients database and import just "name" "phone/email" and "Dob" to check for birthday? (im really new into py, sry if its a really obvious question)

Collapse
_s_w_a_y_a_m_ profile image
Swayam Singh Author

sure buddy, since you already gone through my article so I'll suggest a very similar way:
open that excel file in google sheets and click on file menu then download it as .csv
Now open that .csv file with pandas and instead of comparing months and day separately you can compare DOB with today's date

DOB may contain the birth year so you have to ignore it during comparison. You can take DOB as string and the use .split() method to separate out the month, day and year

Collapse
hernancopello profile image
Hernan Copello

awesome gonna look into that. thank you!!