From the course: Data Analysis with Python and Pandas

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Solution: Importing data

Solution: Importing data

- [Instructor] All right, everybody. Our solution code is up on the right. Let's go ahead and dive into the notebook. All right, so let's import Pandas. And then before we dive into the pre-processing steps, I'm just going to go ahead and read in transaction CSV and get a quick glance at the data types and memory usage. So here our data frame is taking up 6.6 megabytes if we just read it in as is. So let's go ahead and do some pre-processing on this data. First, let's start with our read CSV changes. We're just passing in our file path, and because we wanted to give our data frame custom names, we need to specify header equals zero. To skip our header row. We're then going to give our column names, date, store number, and transaction count. So if we just leave this here. So let's take a look. So now we have date, store number and transaction count, where they used to be date, this abbreviation and just transactions. So we've already taken care of our column names. And remember that…

Contents