From the course: Python for Data Science Tips, Tricks, & Techniques

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Work with CSV files

Work with CSV files - Python Tutorial

From the course: Python for Data Science Tips, Tricks, & Techniques

Start my 1-month free trial

Work with CSV files

- [Instructor] Another common file format you're bound to run across are CSV files, which are Comma Separated Values. These have been around since probably the 70's when it comes to working with data and exchanging it between different companies. Now the thing here is that they're separated by a comma but then at times they have quotes, for example if you had a comma in the value of a field. This is often exported from something like Excel but can be even more useful because unlike an Excel file, these are not limited to a certain number of rows that they can contain. So here in the exercise files, in order to check this out I'm going to start with 01_02. And when I open that up, we have some very basic commands here. I think working with CSV's is quite a bit easier than working with JSON or some of the other more complicated formats that we're going to look at. First we need to simply import our CSV module. Once I run that, I can take a look and create a new object, a new array…

Contents