FAQ: Learn Python: Files - Reading Different Types of CSV Files

This community-built FAQ covers the “Reading Different Types of CSV Files” exercise from the lesson “Learn Python: Files”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn Python 3

FAQs on the exercise Reading Different Types of CSV Files

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

1 Like

7 posts were split to a new topic: Do I need to use @ or a , for the delimiter?

12 posts were split to a new topic: Understanding the newline argument

20 posts were split to a new topic: Python Files Lesson Code Submission Errors

4 posts were split to a new topic: How can I use append with each?

2 posts were split to a new topic: Responses to deleted message

Hi all,

Thank you again for reading this.

My question is about the “newline = ‘’” argument. I understand what the intention behind using that line is. I just don’t understand the mechanism behind its action. What’s between the ‘’ marks exactly?

Thank you again.

Hello all,

Thank you for reading this.

My question is about CSV files and the way we “extract” certain values from it. From the examples I’ve seen so far, it seems like the CSV files have columns (for example ‘name,’ ‘address,’ etc.). Then why is it that when we’re iterating through cvs.DictReader instance, we use the term “row” instead?

having columns doesn’t mean there are no rows

you can iterate through whatever you want, you, the programmer, are the one deciding what happens in your program

have you looked at a csv file? what would iterating through that mean? maybe you can answer your own question if you consider what’s being done instead of how it’s done

and if you iterate through a csv file that you have looked at, what do you get, do you get columns, or rows, and what would you therefore say it is?

Thank you for your response. I think I got it.