SlideShare a Scribd company logo
1 of 9
Dissecting the Program
Assignment
This line imports the pandas library and
assigns it the alias "pd". The pandas library
is a popular data manipulation and analysis
library in Python.
• This imports the pyplot module from the
matplotlib library. matplotlib is a popular
plotting library in Python that is used to create a
wide range of static, animated, and interactive
visualizations.
• as plt: This assigns an alias "plt" to the
imported pyplot module. This alias is commonly
used to reference the pyplot functions without
having to type the full module name each time.
header=0: This argument specifies that the first
row of the Excel file should be considered as
the header row. It means that the column names
for the DataFrame will be taken from this row.
The value 0 indicates that the first row is the
header.
This line defines a function named slope that takes four
arguments: x1, y1, x2, and y2. These arguments
represent the coordinates of two points on a 2D plane:
(x1, y1) and (x2, y2).
•This line calculates the slope of the line passing
through the points (x1, y1) and (x2, y2). The
formula for the slope between two points (x1, y1)
and (x2, y2) is (y2 - y1) / (x2 - x1).
•The calculated slope is stored in the variable s.
This line returns the calculated
slope s from the function.
•This line calls the slope function with the arguments
(0.25, 3, 0.50, 2), representing two points: (0.25, 3) and
(0.50, 2).
•The function calculates the slope of the line passing
through these points and returns the result.
•The print function is used to display the calculated
slope, so the output of the code will be the slope valu
Intro to Statistics
What is Statistics
 is the science of analyzing data.
 is the science concerned with developing and studying
methods for collecting, analyzing, interpreting and
presenting empirical data.
Descriptive Statistics
 refers to a set of methods used to summarize and describe
the main features of a dataset, such as its central tendency,
variability, and distribution. These methods provide an
overview of the data and help identify patterns and
relationships.
Descriptive statistics summarizes
important features of a data set such as:
• Count
• Sum
• Standard Deviation
• Percentile
• Average
• Etc..
 What is describe () in pythonn?
 The describe() method computes and displays summary statistics for a
Python dataframe. (It also operates on dataframe columns and Pandas
series objects.)
is used to view some basic statistical details like percentile, mean,
std, etc. of a data frame or a series of numeric values.
 Ex.
We can use the describe() function in Python to summarize the data:
Statistics Percentiles
 Percentiles are used in statistics to give you a number that describes
the value that a given percent of the values are lower than.
Dropna( Dropping the certain rows that
has no value)

More Related Content

Similar to Lecture5.pptx

Lecture 1 Pandas Basics.pptx machine learning
Lecture 1 Pandas Basics.pptx machine learningLecture 1 Pandas Basics.pptx machine learning
Lecture 1 Pandas Basics.pptx machine learning
my6305874
 

Similar to Lecture5.pptx (20)

Lecture 1 Pandas Basics.pptx machine learning
Lecture 1 Pandas Basics.pptx machine learningLecture 1 Pandas Basics.pptx machine learning
Lecture 1 Pandas Basics.pptx machine learning
 
Machine Learning - Simple Linear Regression
Machine Learning - Simple Linear RegressionMachine Learning - Simple Linear Regression
Machine Learning - Simple Linear Regression
 
Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptx
 
B T0065
B T0065B T0065
B T0065
 
Bt0065
Bt0065Bt0065
Bt0065
 
Introduction of data science
Introduction of data scienceIntroduction of data science
Introduction of data science
 
R programming & Machine Learning
R programming & Machine LearningR programming & Machine Learning
R programming & Machine Learning
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
 
EDA.pptx
EDA.pptxEDA.pptx
EDA.pptx
 
Introduction to R _IMPORTANT FOR DATA ANALYTICS
Introduction to R _IMPORTANT FOR DATA ANALYTICSIntroduction to R _IMPORTANT FOR DATA ANALYTICS
Introduction to R _IMPORTANT FOR DATA ANALYTICS
 
Automatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELAutomatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSEL
 
Python for data analysis
Python for data analysisPython for data analysis
Python for data analysis
 
Python for Data Science
Python for Data SciencePython for Data Science
Python for Data Science
 
Session 4
Session 4Session 4
Session 4
 
James Jesus Bermas on Crash Course on Python
James Jesus Bermas on Crash Course on PythonJames Jesus Bermas on Crash Course on Python
James Jesus Bermas on Crash Course on Python
 
R training2
R training2R training2
R training2
 
Predicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationPredicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project Presentation
 
CPP homework help
CPP homework helpCPP homework help
CPP homework help
 
Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptx
 
Python for Data Analysis.pdf
Python for Data Analysis.pdfPython for Data Analysis.pdf
Python for Data Analysis.pdf
 

More from JohnMichaelPadernill

More from JohnMichaelPadernill (9)

SearchAlgorithm.pdf
SearchAlgorithm.pdfSearchAlgorithm.pdf
SearchAlgorithm.pdf
 
Lecture-6-7.pptx
Lecture-6-7.pptxLecture-6-7.pptx
Lecture-6-7.pptx
 
Lecture3.pptx
Lecture3.pptxLecture3.pptx
Lecture3.pptx
 
maze runner game.pptx
maze runner game.pptxmaze runner game.pptx
maze runner game.pptx
 
Lesson 2 The Maze Runner.pptx
Lesson 2 The Maze Runner.pptxLesson 2 The Maze Runner.pptx
Lesson 2 The Maze Runner.pptx
 
Lesson-1-Hack-Attack.pptx
Lesson-1-Hack-Attack.pptxLesson-1-Hack-Attack.pptx
Lesson-1-Hack-Attack.pptx
 
Lesson-6-Fruit-Slicer.pptx
Lesson-6-Fruit-Slicer.pptxLesson-6-Fruit-Slicer.pptx
Lesson-6-Fruit-Slicer.pptx
 
Lesson-7-Flappy-Bird.pptx
Lesson-7-Flappy-Bird.pptxLesson-7-Flappy-Bird.pptx
Lesson-7-Flappy-Bird.pptx
 
Lesson-8-Asteroid.pptx
Lesson-8-Asteroid.pptxLesson-8-Asteroid.pptx
Lesson-8-Asteroid.pptx
 

Recently uploaded

Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
meharikiros2
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 

Recently uploaded (20)

Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information Systems
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptx
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 

Lecture5.pptx

  • 1. Dissecting the Program Assignment This line imports the pandas library and assigns it the alias "pd". The pandas library is a popular data manipulation and analysis library in Python. • This imports the pyplot module from the matplotlib library. matplotlib is a popular plotting library in Python that is used to create a wide range of static, animated, and interactive visualizations. • as plt: This assigns an alias "plt" to the imported pyplot module. This alias is commonly used to reference the pyplot functions without having to type the full module name each time. header=0: This argument specifies that the first row of the Excel file should be considered as the header row. It means that the column names for the DataFrame will be taken from this row. The value 0 indicates that the first row is the header.
  • 2. This line defines a function named slope that takes four arguments: x1, y1, x2, and y2. These arguments represent the coordinates of two points on a 2D plane: (x1, y1) and (x2, y2). •This line calculates the slope of the line passing through the points (x1, y1) and (x2, y2). The formula for the slope between two points (x1, y1) and (x2, y2) is (y2 - y1) / (x2 - x1). •The calculated slope is stored in the variable s. This line returns the calculated slope s from the function. •This line calls the slope function with the arguments (0.25, 3, 0.50, 2), representing two points: (0.25, 3) and (0.50, 2). •The function calculates the slope of the line passing through these points and returns the result. •The print function is used to display the calculated slope, so the output of the code will be the slope valu
  • 4. What is Statistics  is the science of analyzing data.  is the science concerned with developing and studying methods for collecting, analyzing, interpreting and presenting empirical data.
  • 5. Descriptive Statistics  refers to a set of methods used to summarize and describe the main features of a dataset, such as its central tendency, variability, and distribution. These methods provide an overview of the data and help identify patterns and relationships.
  • 6. Descriptive statistics summarizes important features of a data set such as: • Count • Sum • Standard Deviation • Percentile • Average • Etc..
  • 7.  What is describe () in pythonn?  The describe() method computes and displays summary statistics for a Python dataframe. (It also operates on dataframe columns and Pandas series objects.) is used to view some basic statistical details like percentile, mean, std, etc. of a data frame or a series of numeric values.  Ex. We can use the describe() function in Python to summarize the data:
  • 8. Statistics Percentiles  Percentiles are used in statistics to give you a number that describes the value that a given percent of the values are lower than.
  • 9. Dropna( Dropping the certain rows that has no value)

Editor's Notes

  1. df.plot(x='x', y='y', kind='line'): df refers to the pandas DataFrame that contains the data you want to plot. .plot() is a method provided by pandas to create different types of plots directly from a DataFrame. x='x' and y='y' specify that the 'x' column and 'y' column from the DataFrame should be used as the x-axis and y-axis data for the plot, respectively. kind='line' specifies that a line plot should be created. Other possible values for kind include 'bar', 'hist', 'scatter', and more, to create different types of plots. plt.ylim(ymin=0): plt refers to the matplotlib.pyplot module that was imported earlier. .ylim() is a function from pyplot that is used to set the limits of the y-axis. ymin=0 specifies that the minimum value of the y-axis should be set to 0. This ensures that the y-axis starts from 0. plt.xlim(xmin=0): .xlim() is a function from pyplot used to set the limits of the x-axis. xmin=0 specifies that the minimum value of the x-axis should be set to 0. This ensures that the x-axis starts from 0.
  2. When we have created a model for prediction, we must assess the prediction's reliability. After all, what is a prediction worth, if we cannot rely on it?