Locked lesson.
About this lesson
Pandas is a powerful Python data analysis toolkit. In this video, we'll discuss what it does and how it works.
Exercise files
Download this lesson’s related exercise files.
Installing Pandas and Overview - What is it used for.docx57.1 KB Installing Pandas and Overview - What is it used for - Solution.docx
56.6 KB
Quick reference
Installing Pandas and Overview - What is it used for
When you think of Pandas, think of a spreadsheet.
When to use
Use Pandas to visualize data in Spreadsheet form.
Instructions
To install Pandas - From the Git Bash Terminal (make sure your virtual environment is activated):
pip install pandas
To import Pandas into your Jupyter Notebook:
import pandas as np
Hints & tips
- Install from the terminal: pip install pandas
- Import to Jupyter Notebook: import pandas as np
- 00:04 All right, in this video, I want to start to talk about pandas.
- 00:08 And we'll also install it.
- 00:09 So pandas is a powerful Python data analysis toolkit.
- 00:14 And it's built on top of NumPy, which is why we learn NumPy first, and
- 00:18 it's really used for sort of fast analysis.
- 00:21 And data cleaning, and sort of preparation, right?
- 00:25 So when you think of pandas, think of a spreadsheet.
- 00:29 Pandas is sort of like the Python version of a spreadsheet, so think Excel.
- 00:34 If you're familiar with Excel spreadsheet,
- 00:36 pandas is going to feel very familiar to that, right?
- 00:40 And this is so important because when we're dealing with large chunks of data,
- 00:44 large amounts of numbers, being able to sort of categorize them and
- 00:48 visualize them in a spreadsheet looking way is pleasing to humans.
- 00:55 We're used to seeing rows and columns of data, and
- 00:58 pandas will take care of all of that for us.
- 01:01 It also comes with visualization tools so we can create charts and graphs and
- 01:04 things with them that we'll learn that later on.
- 01:07 So it's just, one of the most important tools for Python data analysis,
- 01:11 it's one of those fundamental things.
- 01:13 And we're going to be spending a lot of this course, going through pandas,
- 01:17 probably the next 20 to 30 videos, at least looking at pandas.
- 01:21 So we're going to do a lot of stuff with pandas.
- 01:23 So in this video, like I said, I just wanted to talk for a couple of minutes
- 01:26 about what panda's is just to give you a very broad understanding.
- 01:31 So just thanks spreadsheets and
- 01:33 you're well on your way to understanding sort of a top level what pandas is.
- 01:38 And for the rest of this video, we need to actually install it.
- 01:40 So just like with NumPy,
- 01:42 we need to install it from the command prompt from the terminal.
- 01:45 And so let's head back over to our Git BASH terminal and
- 01:47 you could see we're in our c/data directory still and
- 01:51 we've got our Jupyter notebook still running in the background.
- 01:55 So I'm going to go ahead and hit Ctrl + C on my keyboard,
- 01:59 and it's just the Ctrl button and the letter C at the same time.
- 02:03 So hold down the control button while you're holding it down,
- 02:05 hit the C button and you can see it breaks out of here.
- 02:09 So we can clear the screen if we want.
- 02:11 And to install pandas all we have to do is pip install pandas.
- 02:15 And when we do this it goes over out into the web collects pandas downloads it.
- 02:20 It has some of the requirements already installed and ready to go.
- 02:24 So it's collecting this pytz, which is a Python timezone file and
- 02:29 pandas itself and then boom, it's done.
- 02:31 So pretty easy to install pandas from the command terminal.
- 02:37 Now I'm hitting the up arrow key on my keyboard to cycle through my,
- 02:41 my most recent commands.
- 02:43 And we come back to this Jupyter notebook command.
- 02:45 So let's run this, so that our Jupyter notebook turns back on again.
- 02:49 And when we do it opens back up and I'm going to close this, and just come
- 02:52 back over here because I've already got it right here, just hit Reload.
- 02:55 And just like when we imported NumPy as np,
- 03:00 now we want to import pandas as pd.
- 03:04 And Shift+Enter in order to run that, and now from now on,
- 03:08 at least in this notebook, we're ready to go.
- 03:11 We can use pandas, however we want from now on.
- 03:15 So, pretty simple, pretty straight forward to install this.
- 03:19 So in the next video we'll look at pandas series.
Lesson notes are only available for subscribers.