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.
Read data with Pandas - Python Tutorial
From the course: Python for Data Science Tips, Tricks, & Techniques
Read data with Pandas
- [Instructor] When it comes to working with data in Python, you're likely going to want to use pandas. So I thought it'd make sense to dig in and show you a few things that are really helpful in getting going with pandas in Python. I'm going to open up the exercise file here for this video, and first and foremost we're just going to import the pandas module. Run that, and then from there I want to read in the csv file that we did before, I'll show you how quick and easy this is. We're going to create what is called a data frame, and you can think of a data frame as sort of a table, or something like a spreadsheet format, so it's really easy and familiar to us, especially if you've been working with data for a long time. So in order to do that, I just simply need to create a new object here, I'm calling it df, then I'm using pd, the alias for pandas we created, and I'm saying read_csv and giving it the location of the csv. I do that, and then if I just print out the df, you can see I…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.