Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialArturo Acosta
7,638 PointsI managed to import the csv but still don't know how it works
In this line: with open(input_file, 'r')..... what does that 'r' do and please explain what are the parameters, does it have to do with the folder or directory you're looking in or something?. I couldn't find an answer myself for this one sorry.
1 Answer
Steven Parker
231,248 PointsThe "open" function takes two arguments, the filename and the mode. The "mode" is a code indicating what you will be doing with the file, and "r" means it will only be read.
For more details, see the online Python documentation for Reading and Writing Files.
Arturo Acosta
7,638 PointsArturo Acosta
7,638 PointsThank you