WEBVTT

00:00.000 --> 00:04.000
Introduction to Pandas Library

00:04.000 --> 00:10.000
In this video, we will understand what the Pandas Library is and its importance in data analysis.

00:10.000 --> 00:14.000
Identify and describe Pandas' key data structures.

00:14.000 --> 00:21.000
Learn how to load, inspect, filter, sort, and group data using Pandas.

00:21.000 --> 00:27.000
Apply basic Pandas' operations to analyze and summarize real-world data sets.

00:27.000 --> 00:33.000
Have you ever known how in programming, computers organize and handle huge amounts of data?

00:33.000 --> 00:35.000
That's where Pandas comes in.

00:35.000 --> 00:41.000
Pandas is a Python library that helps us manipulate and understand data easily.

00:41.000 --> 00:49.000
Now, let's understand Pandas step-by-step, starting with installing Python.

00:49.000 --> 00:53.000
Go to your web browser and search python.org.

00:53.000 --> 00:57.000
Open the official Python website.

00:57.000 --> 01:03.000
Download the latest version and run the setup file.

01:10.000 --> 01:15.000
Once the installation is complete, open your command prompt type.

01:15.000 --> 01:21.000
Python-ELPIP install--upgrade-PIP and press enter.

01:21.000 --> 01:27.000
This updates PIP, which helps install other Python packages smoothly.

01:27.000 --> 01:31.000
Next, install Pandas.

01:31.000 --> 01:37.000
Type Python-EMPIP install-pandas- and hit enter.

01:37.000 --> 01:41.000
Wait for the installation to complete.

01:41.000 --> 01:45.000
You'll see a requirement-satisfied message.

01:45.000 --> 01:48.000
Now, install Jupyter Notebook.

01:48.000 --> 01:56.000
Type Python-EMPIP install notebook- and press enter.

01:56.000 --> 02:01.000
This will download and set up Jupyter on your computer.

02:01.000 --> 02:05.000
Once it's done, start Jupyter Notebook by typing.

02:05.000 --> 02:08.000
Python-EM notebook.

02:08.000 --> 02:12.000
The browser will automatically open the Jupyter interface.

02:12.000 --> 02:18.000
Now, let's upload a CSV file containing a large data set.

02:18.000 --> 02:23.000
In Jupyter Notebook, we'll use pandas to load and organize this data easily.

02:23.000 --> 02:31.000
After uploading your CSV file, click on new at the top right corner and select Python 3.

02:31.000 --> 02:39.000
A new blank notebook will open where we can start writing Python code to load and analyze our data.

02:39.000 --> 02:44.000
First, import pandas using import pandas as PD.

02:44.000 --> 02:54.000
Then, read your CSV file with dash-df equals PD.read-csv-open-quote-example.csv-close-quote.

02:54.000 --> 02:59.000
Finally, type df.head to see the first few rows of your data set.

02:59.000 --> 03:07.000
Pandas displays a neat table so you can quickly inspect and understand your data.

03:07.000 --> 03:12.000
Now that we've loaded the data set, let's filter and sort the data.

03:12.000 --> 03:16.000
First, we'll filter the rows where the age is greater than 30.

03:16.000 --> 03:22.000
In Python-type, filtered equals df.open-bracket,

03:22.000 --> 03:29.000
f.close-bracket, open-bracket, df.close-bracket, open-bracket, age.close-bracket,

03:29.000 --> 03:36.000
greater than 30.close-bracket, and then print open parenthesis filtered, close parenthesis.

03:36.000 --> 03:40.000
Pandas will show only the rows where age is above 30.

03:40.000 --> 03:45.000
Next, we can sort the entire data set by the sales column.

03:45.000 --> 03:51.000
Type, sorted, all equals df.sort.values.

03:51.000 --> 03:56.000
Sales, ascending equals false, and then print sorted all.

03:56.000 --> 04:06.000
This displays all rows sorted from highest to lowest sales, making it easier to analyze top performers.

04:06.000 --> 04:12.000
Now, let's explore grouping and aggregation in our data set to get meaningful insights.

04:12.000 --> 04:17.000
First, we'll group the data by product and calculate the total sales.

04:17.000 --> 04:24.000
Pandas will display the total sales for each product.

04:24.000 --> 04:28.000
Next, we'll calculate the average sales per product.

04:28.000 --> 04:37.000
This gives a clear summary of how each product is performing on average.

04:37.000 --> 04:41.000
Finally, we can count the number of sales entries per product.

04:42.000 --> 04:50.000
Now, we can see how many sales records exist for each product helping us understand the distribution of our sales data.

04:50.000 --> 04:53.000
Let's merge two data sets in pandas.

04:53.000 --> 04:59.000
First, load the sales data, then load regional targets.

04:59.000 --> 05:03.000
Merge them using merged all-duty df.

05:03.000 --> 05:07.000
Finally, print the merged data frame.

05:07.000 --> 05:14.000
Now, all sales data and regional targets are combined in one organized table.

