CSV Files with Python — Reading and Writing

Опубликовано: 12 Апрель 2019
на канале: teclado
20,799
364

Learn to read and write CSV files with Python by using the built-in csv module. We'll also learn about CSV named columns by using csv.DictReader and csv.DictWriter.

CSV files are comma-separated files. That means that by using commas, we split the file into columns. We can use Python to read CSV files by going through the file line by line, and then splitting each line into its columns by using the comma as a delimiter.

Alternatively we can use the csv module in Python to read CSV files more easily.

Using the csv module has a few advantages, such as simplifying your code, making it more efficient, and also dealing with pesky edge cases like when you have commas in the data you want to write to the CSV.


-- Links mentioned in the video --

✅ Blog post on slicing
http://blog.tecladocode.com/python-sl...

✅ The csv module documentation
https://docs.python.org/3/library/csv...

✅ Support us and learn by taking our Complete Python Course
https://www.udemy.com/the-complete-py...

✅ Subscribe to our channel for more content. We release new videos weekly!
   / @tecladocode  

Hope you've learned how to read and write CSV files with Python in this video.

Thank you for watching!


Смотрите видео CSV Files with Python — Reading and Writing онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь teclado 12 Апрель 2019, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 20,799 раз и оно понравилось 364 людям.