Python Pandas Presentation
Python Pandas Presentation
PYTHON
By:
Aayushi Pathak, Bhauk Yadav, Abhijeet, Srishti Jain, Praveen Shahani
Table of contents
• A Series is a one-
dimensional labeled array
that can hold any data type. OUTPUT
• We can also provide
custom labels for the
Series using the index OUTPUT
parameter
Working with DataFrames in Pandas
It is used to reshape a
given data frame
organized by given index/
column values. It does not
support data aggregation,
multiple values will result
in a multi index in the
columns. OUTPUT
Descriptive Statistics Using Pandas
• Descriptive statistics are
brief informational
coefficients that summarize
a given data set
• They are broken down into
measures of central
tendency and measures of
variability (spread)
• Measures of central
tendency include the mean,
median, and mode, while
measures of variability
include standard deviation,
variance, minimum and
maximum variables.
We can use df.describe() it will also give all the measures mentioned
OUTPUT
02
Pandas for Data Analysis
Steps Covered
• The first step in data cleaning is to import the data into Pandas. Pandas provides several functions to
read different types of data, such as CSV, Excel, SQL, and more.
Data Exploration
Data Manipulation
03 04
Merging Grouping
Data Filtering
– Here (name, marks and course are the column names and (1,2,3,4,5) are the rows name.
Reindexing the Rows
One can reindex a single row or multiple rows by using reindex() method. Default values in the
new index that are not present in the dataframe are assigned NaN.
– Here in reindexing the rows only the place is being changed here from (1st position to 2nd or 3rd).
Don’t think you can change the row name using it.
– We can reindex a single column or multiple columns by using reindex() method and by specifying
the axis we want to reindex. Default values in the new index that are not present in the dataframe are
assigned NaN.
Reindexing the Columns
We can reindex a single column or multiple columns by using reindex() method and by specifying
the axis we want to reindex. Default values in the new index that are not present in the dataframe
are assigned NaN.
– Use ffill() function to fill the missing values along the index axis.
– When ffill() is applied across the index then any missing value is filled based on the corresponding
value in the previous row.
– Here we just make a DataFrame –Firstly, we will fill this
with some missing values and missing value using the –Now we will fill the NaN
these values is denoted by NaN. index axis. value using column axis
Altering/Rename Column Labels
Using Rename() Function: One way of renaming the columns in a Pandas Dataframe is by
using the rename() function. This method is quite useful when we need to rename some selected
columns because we need to specify information only for the columns which are to be renamed.
– Rename Column name using
– By Assigning a list of new column names
DataFrameset_axis() Function
03
Broadway Theatre Example Using
Pandas
https://colab.research.google.com/drive/1HDKICQU0foyTdIHHkFyNQTUxrNzlfK9l?
usp=sharing
THANK YOU