Python Basics: Reading Data From CSV File

preview_player
Показать описание
Let’s create a script that is actually useful. Load of us use Spreadsheets or Excel files to store some data. What about reading the data and performing some tasks for each row from the table? Today I will show you how to generate a CSV (Comma Separated Value) file and how to read it in Python. This video will be useful for the next video, where we will actually send e-mails to all people listed in spreadsheet.

✅💻 Extra homework
The script I showed you is a simple version that does not take into account some edge cases and problems with data. Here is some list of things you might want to consider and check if you could fix them on your own:
* your script expects 5 variables in each row from CSV. What if you have more or less values? Try to create CSV without Language column and/or add one extra column, for example birthday.
* what if your data contains either “Yes”, “yes”, “Y”, “y”, “1” to indicate that someone is accepted. Can you make your script to work with many different variation of data in this column?
* what if one of the values we use: name, coach or email is empty? Can you make sure that we do not display line about the coach for accepted people if there is no coach name provided?

💁💻 My social media:

🐍📖 Check these resources to learn more:

🎬🐍 Python Basics Playlist (if you want to start from the very beginning):
Рекомендации по теме
Комментарии
Автор

I love when she says "variables"... thanx for the videos!

NicolasIbarra
Автор

A good teacher tries to make sure the "slowest" student in the class understands. So take all the time you need to explain and SHOW how things are done!

LenCedeno
Автор

You're amazing! Video came in handy. Just subscribed. Thanx.

RenatoDalcin
Автор

Coding is for girls and boys! Congrats! Well done, thanks from Brazil

diegomalaquias
Автор

Thank u for u contribute your time to do this video, this is a meaningful and understandable example, it is just right for my stage. as a beginner.(a mid-age Mom of 2 kids)
Coding is not only for men, but everyone willing to learn :)

yingbowang
Автор

I'm starting coding python and I'm feeling like Wow, a few lines to do it all... Amazing

owow
Автор

Super, très bien amené, de façon simple et logique. C'est clair, c'est cours, c'est concis, c'est concret...Bravo!

-x-dx
Автор

Hola Ola, I really enjoy your videos! Please keep making more, I'm learning so much, and your videos are so helpful :)

subscribes
Автор

I love Python.Your Tutorial and you both are beautiful.

afzalhassan
Автор

Great tutorial, everything on point and easy to follow. Thanks ! :D

OliverGomes
Автор

I love Python but recently discovered Elixir. A functional language built on top of the powerful Erlang VM.

djsnakeyes
Автор

Sorry, I am a boy, but this is excellent thanks :-)

rupertrussell
Автор

you have a new subscriber.. good channel! Thanks from Spain :D

nicolaswolyniec
Автор

mais um inscrito, sou brasileiro... Vou acompanhar seus vídeos. Thanks!!

ricardopinheiro
Автор

jesus christ. I love you so much. Amazing vid, very helpful. you got yourself a new subscriber! thank you! from Aus

Qquitful
Автор

I'm not a girl but this channel is awesome! Thanks

jamieslate
Автор

Hello Ola,
It is nice & easiest way you describe the agenda. Thanks for that.I am also looking for such videos in GUI like Tkinter. If you have any experience on that, could you pls share the same.
once again thanks:)

rahulkishor
Автор

This was really good video. Could you please make a continuation video showing how to insert the csv data into Django database.

NeerajSharma-obwf
Автор

Is it only for girls :)
You are much more than amazing! .. just keep on

AhmedJendeya
Автор

Hi, i really like your videos, very informative. Could you do a video on append and combining csv files using python. Thanks

louiemalim