Transcripts
1. Introduction To Data Science Course: Welcome everyone to
the first class of complete introduction to
Python for data science. For the data science, we are going to need the Python programming language
because Python is powerful open source
programming language for the data science. So for most of the libraries
for the data science, that are all present in
the Python language. So that's why we are going to need Python for
the data science. So after that, we are
going to discuss about what are all the concepts
in data science. The first one is the Num Pi. So Num Pi is
powerful open source for scientific computing
for the Python language. So that's scientific
computing like mathematical equesence and
mathematical formulas. For that, you are
to need the numPis and also if you want to create
multidimensional array, you to need the NumPi. So that's the use of Num Pi. And then the third one
will be the Pandas. So Pandas is also a powerful
open source Python library, which can be used for data
manplaan and analysis. For the datasets like CSV file, Excel file, we are going
to need the data analysis. For the data analysis, we're going to need Pandas. So Pandas is present in the open source
library of the Python. And then we are going to discuss about MAD plot lip in Python. So MD plotlip is also one of the open source
library in Python, which can be used for
data visualization. So the data visualization
like bar chart, Pichart and graph scatter plot, lots of plots are available in MAD plotlip for the
data visualization. And then CBN in Python, CBRN is also one of the data visualization library
present in the Python. So there are a lot
of plots available in CBN compared to MAT platip. So the plots scatter plots, heat maps, violin blots, bar plots, pipe plots. So there are a lot
of plots in Sabar. So C ban is very, very useful
for data visualization. After that, we are
going to discuss about the advantages of data science. And the first one will be that
enhanced decision making. So data science helps in data analysis and
data visualization. From that, we can
decide our output. So that's the use of decision making with the help
of data science. And the second one is the
improved efficiencies. We can improve the
other techniques using that data science. We can also improve
the accuracy, precisions of the data science. And the third one will be
the competitive advantage. So there are a lot of advantages when you learn data science. And the fourth one will be the
innovation and disruption. So data science can be useful
for new innovations and new trends in the upcoming
future world. So that's it. We discussed about
the importance of Python in data science. For data science, lot of libraries are present in the
Python programming language. So that's why we
are going to need Python programming
language for data science. So in the upcoming classes, we are going to discuss about
Num Pi, Pandas, MD plotlip. So let's see in the next class.
2. Pandas Class 1 : Import Dataset: Welcome everyone to
the first class. In today's class, we are
going to discuss about how to import the
dataset for the Pandas, and also we are going to
discuss about how to install the pandas package and how to
import the pandas package. For the data analysis
like CSV Excel five, we are going to need
the help of Pandas. Also, Pandas is the library present in the Python
programming language. So first, we are going
to discuss about how to import the dataset
for the pandas. In the Google Colab, you
can see the upload option, you have to select that option. And then how to
select your CSV file. So CSV file full form is nothing but comma separated values. So you have to
import the CSV file, and then how to select
and open the file. So in that, you can
see the columns like duras and date pulse,
max, pulse, calories. So this CSV file will be
useful for our pandas. So we discussed about how to import the dataset
for the pandas. And then we are going
to discuss about how to install the
pandas package. For that, to type
PIP install pandas. So before that, you have to add the symbol and then you
have to run the code. So you can see my Pandas is already installed
in the Python 3.10. So that's the step for
installing the pandas. And then we are going
to discuss about how to import the
pandas package. You to type import pandas as PD. So PD is nothing but
sort form of pandas. So you have to run,
and then you can see so you have to run the code. So you can see your
pandas package is imported successfully. So we are going to
discuss about how to read our CSV file using
the pandas package. For that, you have to create a variable data equal to PD dot. PD is nothing but pandas. Read, you have to type
read hyphen CSV off. Inside the quotation, you have
to type the CSV file name. And then format data dot CSV. You have to run the
code, so you can see your Pandas data set is
imported. So that's it. In today's class, we
are discussed about how to install the
pandas package, and also we are
discussed about how to import the dataset
for the pandas.
3. Pandas Class 2 : Info Function: Welcome everyone to
the third class. In today's class, we
are going to discuss about information
function in Pandas. So the concept of
information is nothing, but it prints the
information of our CSV file. So what are all the data types? What are all the columns
available in the CSV file? So how to type print, so how to type
data dot info off. So you have to run the code. You can see the information
of our CSV file. So there are five
columns, duration, date, pulse and max
pulse, 32 entries 0-31. So our class will be data frame. And then you can see
the data types of the columns, integer, object, float, and also the null values, and then the memory usage. So you can see the To bit. So that's the use of
information in Pandas.
4. Pandas Class 3 : Head & Tail: Welcome everyone to the
second class of pandas. In today's class, we
are going to discuss about head and tail
function in pandas. So first, we are going to discuss about head
functs and in pandas. So the concept of
head is nothing, but we are going to
print top ten values or top five values using
the head function. So we are going to
discuss an example, so we have to print data, dt, and then we have
to type head function. So we have to type head off. So in default, the output will so top five values
of the CSV file. So you can see in the output, top five values are printed
in the output zero to four. So 00 is the first index. So default head value, print, top five values. So if you want to print 20
or ten inside the head, you have to type the value. So inside the head,
you got to type the value 20 or ten or five. So then you have
to run the code. So you can see zero to 19 values are printed
in the output. So these values are
present in the CSV file. So that's the use
of head function. It prints top values. And then we are going to discuss about tail function in Pandas. So tail function is
opposite to head function. Head function prints top values, tail function prints
bottom values. So we are going to see an
example how to print data dot. So you how to print,
data dot, tail off. So in default, bottom five values will
be printed in the output. So you have to run the code. So you can see bottom
five values are printed in the output, 31227. So there are tat one values
present in our CSV file. So if you want to print 20, how to type 20, and then
you have to run the code. So you can see bottom 220 values printed in the output, 312 toll. So that's the use of
head and tail function. Head function prints top five
values are top ten values, Tai function prints bottom
five values are ten values.
5. Pandas Class 4 : Drop Duplicates Function: Come, everyone.
In today's class, we are going to discuss
about how to remove the duplicate row
from our CSV file. So in our CSV file, the last two rows
are duplicated. For that, we have to remove the duplicates
from our CSV file. So you have to type DF. So that's the data
variable, DF dot, drop, drop under
scool duplicates. So that's the fonts and
to remove the duplicates. And then we are going
to print our CSV file. So in the output, you can see the two last
rows duplicated are removed. Only one row is present, other duplicate value
row is deleted. Two rows are not deleted, only one duplicated
row is deleted. So that's the use
of drop duplicates. So if you want to remove
duplicates from the column, you have to type
the code for that. For that, we are going to remove the duplicate values
from the pulse column. So again, you have to
type df dot, drop, underscore duplicates
of inside that, you have to type the
funct and subset, subset equal to, and then you have to type
the column name. Column name can be
pulse from the pulse, all the duplicate
values are removed. So the duplicate
values like 103, 108 will be removed. So that's the use of drop duplicates in
the subset function. So you can see only
less amount of rows are present because all the duplicate value
rows are deleted. So in the other columns, the duplicate value
will be present. But in the column of pulse, no duplicate value will present.
6. Pandas Class 5 : Dropna Function: Come, everyone.
In today's class, we are going to discuss about
dropna function in Pandas. So dropna function is
very, very useful for. If you want to delete all the null values
present in your dataset, we are going to need the
help of drop nu function. So in our CSV file, there are a lot of null values are present in our columns. So the null values
in the row 20, you can see the null value, and also you can see the
null value in the row 24. So there are a lot
of null values present in our CSV file. We are going to remove the
null values from our CSV file. Before using the drop nu, you have to remember that by
using the drop nu function, whole row will be deleted. So you have to
remember that drop nu deletes whole row
of the null value. So we are going
to see an example how to delete the null values. So you have to type data equal t. So that's the variable
which holds the CSV file, and then you have to type data dot dropna,
that's the function. So drop null values. So after that, we are going
to print our CSV file, so that's the data. So if you run the code, so you can see all the null
value rows are deleted. So you can see there
are no null values present in our CSV file. So that's the use
of dropna function. If you use dropna function, it completely deletes
the null value row. So in our CSV file, there are 33 rows are present. So you can see 33
rows are present in our CSV file,
original CSV file. So after the usage
of dropna function, only 30 rows are
present in our output because the null value rows are deleted from our CSV file. So in the next class, we are going to see
about how to fill the null values with random
values or own values.
7. Pandas Class 6 : Fillna Function: Hello, everyone.
In today's class, we are going to discuss about
fillna function in Pandas. So fillna function is
opposite to dropna function, so dropna completely deletes
the null value rows. But in the fillna function, we are going to
fill our own values or random values in
the null value rows. For that, only we
are going to need the help of fillna function. So we are going to
see an example. So you have to type data
equal, data dot, fillna. So you have to type
the function fillna. So inside the bracade have
to type your own value, which you replace
the null value. So thousand will replace all the null values
in your CSV file. So after that, we are going
to print our CSV file. So in the output, you can
see in the null value place, thousand will be replaced. So you can see, all
the null values are replaced by 1,000. So if the data type is integer, thousand will be present. If the data type is float, zero will be added.
8. Pandas Class 7 : Replace Function: However, in today's class, we are going to
discuss about how to replace the values in
the Pandas data set. For that, we are going
to see an example how to replace the value
with another value. First, we are going to
print our CSV file. So in that, you can see all
the values of the CSV file. We are going to change the value 60 in the duration column. With another value. For that, you have to
type Dt, that's the data, and then you have to type
the column name duration, dot replace function, and then you have to type
the values to be replaced. For replacing, we are going
to use the dictionary. Key value pair, 60 will
be replaced by 100. You can type your own values. Come in place equal to true. So in place equal
to true is nothing, but we are going to so we are going to change our
value in the dataset. Say out to run. And then we are going to
print the value of DT So so so you have to remember that for the integer in
the dictionary, you don't have to
type the quotation. So you have to
remove the quotation because in dictionary, integer does not have quotation. So after that, you
have to run the code. So in the output, you can
see all the 60 values in the duration column
are changed to 100. So you can see all the
60s are changed to 100. So that's the use of
replace function in Pandas. If we want to replace any
value with another value, we have to use the
replace function.
9. Numpy Class 1 : Presentation: Welcome everyone
to the first class of complete
introduction to Numbi. So NumPi is powerful
open source library, which is present in the
Python programming language. So Numpi can be useful
for scientific computing. So the scientific computing like finding the values of the
mathematical operations, mathematical for las, and
also we are going to need NumPi for creating multidimensional
array and matrices. For that, the numPi is
very, very, very useful. But also, we are going to
discuss about the concept, why the numPi is
faster than list. In list, the values are stored
in discontinuous places. But in the case of Num Pi, the values are stored
in continuous places. So that's the most
important difference between Num Pi and list. For the discontinuous place, the indexing concept is
very, very, very slow. For that, only the list
is slower than NumPi. And also the numPi
can be used for the low level languages
like C and Foton. So we can use NumPi for more memory efficient
than Python list. So why the numPi is
faster than list is nothing but NumPi stores the
values in continuous place. But in list, the values are stored in
discontinuous place. For example, if you want to
search any value in the list, it takes more amount of time. But in the case
of NumPi it takes only less amount of time
because of continuous place. So there are many types
of array in Nampi we are going to discuss one
by one in the coming class. So the first one will be the zero dimensional array and then one dimensional array, two dimensional array,
three dimensional array, and then multidimensional array. So there are many data types in Numpi so we can use
integer data type, float data type,
Boolean data type, complex data type,
object data type. So there are three advantages
of Numpi high performance, memory, efficiency,
vectorized operons. So that's if we completed the introduction to NumPi
In the upcoming class, we are going to discuss
about how to create a NumPi and how to create
a functions in NumPi
10. Numpy Class 2 : Import Package: Welcome, everyone, to the
second class of NumPi. In today's class, we
are going to discuss about how to install
Numpi in Python, and also we are going to discuss about how to import
the Numpi package. For that, first, we are going
to discuss about how to install NumPi for that, you have to type the command. You have to PIP install Num Pi. So that's the syntax
for installing Num Pi. In Google Collar, you have
to type symbol before PIP. After that, only your
output will execute. So in other IDs, you don't have to type symbol for installing the packages. In Google Colab, you have to type symbol for
installing the package. NumPi is already
installed in my computer. So you can see, Python 3.10 already installed
the NumPi package. So after that, we are
going to discuss about how to import the NumPi
package in Google collab. For that, you have to
type the code, Import, and then you have to type
the package NumPi as NNP. We are going to
call NumPi as NP. You have to run the code for importing the package of NumPi. So in the upcoming
class, we are going to discuss about how to
create NumPi array.
11. Numpy Class 3 : Multi Dimensional Array: Welcome, everyone.
In today's class, we are going to discuss about
the types of NumPi array. For the first, we are going to create zero dimensional array, and then we are going to create one dimensional array,
multi dimensional array. First, we are going to create
zero dimensional array, to type N equal t, Np NP is nothing but NumPi
then to type array of. Inside that, you can
type your own value. I'm going to type one. If you run this
code, after that, you have to print the value of N. And then you have
to run the code. You can see one. So this is the syntax for creating
zero dimensional array. So after that, we
are going to discuss about how to create
one dimensional array. For that, we are going to type N equality NB dot array of. Inside that you have to
type the square bracket, and then you have to type
the value one command, two. So that's the syntax for
creating one dimensional array. For zero dimensional array, you don't have to
type square bracket. For one dimensional array, you have to type square bracket. So one square bracket
equal to one dimensional. To square bracket, it will be considered as
two dimensional. The square bracket will be considered as
three dimensional. For the simple way
of understanding num Pi dimenson you have to
remember the square brackets. One square bracket
will be considered as one dimensional array, one dimensional num Pi array. So after that, we are
going to discuss about how to create two dimensional array. For that, you have to create an variable N equal to NB dt. So NB is nothing but
NumPi dot array of. Inside that auto type
two square bracket. After that, you have to time
the value one comma two. Come on, and then
you have to type the second values to comma five. So that's the
syntax for creating two dimensional array because there are two square bracket. For the simple way
to understand, you have to remember
the square brackets. So after that, we are going
to print the value of N. So you can see the output one comma two and two comma five. So after that, we are
going to discuss about how to create three
dimensional array. For that, we are going
to create a value N equal t NP dart, array of. So inside that, you got to
type three square bracket. So three square bracket is
nothing but three dimensional. And then you have
to type the values. So you can type your own
values, three comma four. So that's the syntax for creating three
dimensional array, three square bracket
four, three dimensional. After that, we are going
to print the value of N, so you can see one comma
two and three comma four. So that's it. In today's class, we
are discussed about how to create three dimensional, two dimensional,
one dimensional, zero dimensional NumPi array.
12. Numpy Class 4 : Ndim Function: Welcome everyone.
In today's class, we are going to discuss
about dim function in Nampi. So if you don't know how to find the dimensons of the array, we are going to need
the dM function for finding the
diamond sun of array. For that, we are going
to see an example. We are going to copy and paste the three dimensional array
from the previous class. So you to copy, and
then you have to paste. We are going to find
the dimenson of this array for that you
have to print inside that to type dot dN dt N d so if you try
to run the code, it will generate the
diamondsons of the array. So the diamonds
on will be three. So in the previous class, I told you that three
square bracket comes, it will be considered
as three dimensional. If you don't know how to
find the diamond sun, you have to use dim function.
13. Numpy Class 5 : Ndmin Function: Welcome everyone.
In today's class, we are going to discuss
about N minimum function. So minimum function is
very, very useful for. If you want to create
multidimensional array, you have to use
minimum function. For that, we are going
to see an example. We are going to create
ten dimensional array. So for that, you have to type A equaltiveNp dot
array of first, we are going to create
one dimensional array. So you have to type
one square bracket. Inside that, you have to type
the value one command, two, and then we are going to convert that one dimensional array
into ten dimensional array. So you have to type N
minimum equal to ten. One dimensional will be converted to ten
dimensional array. So after that, you have
to print the value of A, and then we are going to print
the dimensional of the A. At N minimum. So in the output, you can see ten square
brackets are created. First, one dimens null is
converted to ten dimens null. For one dimensionll
one square bracket, for ten dimens null,
ten square bracket. So you have to count the
number of square bracket, so it will be considered
as ten square brackets. And also, you can see
the diamonds null. So diamond cell is changed from one dimens null
to ten dimens null. So that's the use of N minimum.
14. Numpy Class 6 : Nditer Function: Welcome, everyone.
In today's class, we are going to
discuss about how to iterate the elements one by one, using the NDT function. For that, we are going to see an example how to iterate
the elements one by one. So you have to create a
NumPi array N equal to NP that array of so we are
going to create an array, one comma, four, comma, six, comma three, comma six, come three, come eight. You can type your own values. After that, we are going
to iterate the elements. For Irata elements,
we are going to need the R loop for I N, and then you have
to type Np dot. You have to call the
function N dicta. Of A. So that's the array, and then we are going to
print the value of I. So by doing this, we can call the
elements one by one. So output will one, four, six, three, six,
three, eight, two. So The function is wrong. You have to type N d. You have to remove one T
from the function. So you have to remove
one T from the function, and then you have
to run the code. So you can see the values of the Numbi RA itrated one by one. Also, you can use the ND or for finding the E numbers
and odd numbers. Okay. For that, we are
going to see an example. You have to use the
I condition if I divided by two equal
to equal to zero. So the value of I
divided by two, the remainder gives zero, it will be considered
as E one number. So what are all the
values divided by two, which gives the remainder zero, that will be considered
as even numbers. So if you want to
find the R numbers, you ought to change the
naught equal to zero. So in the output, you can
see one, three, and three. So four, six, six, eight, two, these are
all the even numbers. That's it. In today's class, we discussed about
how to iterate the elements one by one
using the Nd function.
15. Numpy Class 7 : Search Sort Functions: Welcome everyone.
In today's class, we are going to
discuss about what are all the functions available
in NumPiF the first, we are going to discuss
about copy function in umpi. Copy function is nothing, but we are going to create an array from the
original array. For that, we are going
to create an array, X equal te Np dot, array of. We are going to create single dimensional array one comma pi. And then we are going to create a new array with a copy of X. For that, you have to type
the variable name dot copy of so the variable will be X. And then we are going to
print the value of X and T, you have to run the code. So in the output, you
can see the value will be copied from
the original array. IT copied from the X array. Same values one comma
pi, one comma pi. So that's the use
of copy function. So after that, we are
going to discuss about how to change the
values in the numpi. For that first, we
are going to create an NumPi you have to type A
equality Np dot array of. We are going to create
one dimensional array, one comma four. And then we are going to
print the value of A. So if you run the code, you can see the values
one comma four. After that, we are going
to change the value. You have to remember
the index concept. One will be the index of zero. So you have to type
a square bracket of inside that To type the index
position one equal to zero. So one will be the index
position of four value. We are going to change
the value of four. And then we are going to
print the value of a RA. So we can also change
the index positions. Whatever values if
you want to change, you can change the values. So in the index position of one, four change to zero. Also, I'm going to change
the value of zero index. So the zero the index
is nothing but one, so it will be changed to zero. So it will be changed to zero. Zero comma seven. So if you want to change the
values of the umpi array, you ought to use the
change function, and also you have to
remember the index concept. So this is the example
for one dimensional. After that we are going
to discuss about how to change the values in the
two dimensional array. For that, you have to create
two dimensional array N equality NP tat array
of two square bracket. Inside that you have to type
the values, one comma five, and then you have
to type the second array value, three comma six. So we are going to
print the value of NF one comma five
is the zero array. Three comma six is the first array in
the two dimensional. Also in the zeroth array, one will be considered
as zeroth index. Five will be considered
as first index. So in the first array
of the two dimensional, three will be considered
as zeroth index. Six will be considered
as first index. So you have to
remember the concept in the two dimensional array, we are going to change the
value zero. That's the array. Zeroth array, that is one comma f. And then we are going to change the value
of the index. So in the zeroth array, the zeroth index will be one. One will be changed to
Nian so zero is the array. And then comma zero is
the index position. So if you run the code, if you run the code, so you can see the values are changed. So you can see NO
is changed to NN. So for the convenience, I'm going to remove all the previous code and run the code. So you can see values of the first array changed to
values of the second array, zeroth index that is zero
array value changed. After that, we are
going to discuss about sorting function in Numpi. So sorting can be ascending
order and descending arder. So we are going to create
a NumPi Aequaltnbt array. We are going to create one dimensional array to comma one. And then we are going to
print the value of A. So after that, I'm going to
sort the values for that, you have to print NP dt short. So that's the function. Inside that you to
type the array name, and then x is equal to zero. For Ax is equal to zero, it will be sorting
in the column Vise. For x is equal to one, it will be sorting in the
row Vs. For one dimensional, column sort will be possible. For two dimensional only
row SAT will be possible. So you have to print the value. So in the output, you can see two comma one is changed
to one comma two. For the one dimensional. After that, we are going to create sorting for
two dimensional. For that, you have to type double square bracket,
and then values, three comma one and five comma seven are your own
values, six comma two. After that, we are going
to sort the values, and then we are going
to print the value of NB do sort of, you have to type the
value of the array, X is equal to one. X is equal to one is
nothing but row is sorting. In two dimensional. So three comma one will be
changed to one comma three. Six comma two will be
changed to two comma six. So that's the row y
sorting, one comma three, and then two comma
six. So that's it. In today's class, we are
discussed about how to sort in the row s
and the column is. So after that, we are
going to discuss about loss function in NumPi that will be searching the
elements in the numPi. We are going to
discuss an example. We have to create a NumPi array. We are going to create one dimensional array,
one comma, two. We are going to find
the value of two. So value of two will be generated in the output in
the form of index position. For that, we are going to create an function X equal Np dot, you have to create a function
A equal, equal to two. So in the output, it generates the index position
of the value two. You have to print
the value of X. To remember in the
search output value will be generated as index
position of the value. So in the output, you
can see one because the index position of two
in the NumPi RA is one. So that's why output source one. So if you want to find the
index value of the one value, you have to change the value
and then run the code. So in the output, you can
see the index position zero. So the value of A is present
in the index position zero.
16. Numpy Class 8 : dtype Function: Everyone, in today's class, we are going to discuss about
D type function in NumPi. D type is very, very
useful for if you want to find the data type
of the NumPi array, you ought to use that D type. For that, we are going
to see an example. So you have to type N
equality Np dot array of, we are going to create
one dimensional array, and then we are going to find
the data type of the numPi. For that only we are going
to need the D type function. You have to type N dot D type. That is nothing but
data type of the Numpi. So it will be generated
as integer 64. So one comma two is nothing
but integer data type. Also we are going to discuss
about typecasting in Numpi. For that, we are
going to convert the integer data type to float data type for that oto
type D type equal to float. We are going to convert the
integer Numpi array to float. So in the output, we
can see point value is added for converting the
integer type to float. Also, you can tie
other functions of the float So you can see
16 to 56 Taty 264, 80. So there are many
types of float. So you can also use Own
float for your project. So the D type can be
used for both finding the data type of
the Numbi array and also typecasting for the Numbi. Also you can change
the integer data type to string data type using
the D type function. So you have to type
string underscore for converting the integer data type to string data type. That's it. In today's class we discussed
about D type in NumPi. D type is useful for finding the data type and
also typecasting.
17. Numpy Class 9 : Concatenate Function: However, in today's class, we are going to
discuss about how to combine two or more
array in umpi. For that, we are going to
create function concatenate. So concatenate is useful for
combining two or more array. First, we are going to create an array N equality
Np dot array of. We are going to create one dimensional array,
one comma four. And then we are going to create second array Np dot
array of two comma five. We are going to combine these two array using the
concatenate function. For that, we are going to create a new array B equal to NP dt, concatenate of so
inside the bracket, you have to type the
values of the array. So the array variable
will be A and N. So you have to type
double bracket, AN. And then we are going to
print the value of B. So in the output, you can
see the array two comma pi, and then N array one comma four are combined in the array of B. So that's the use of
concatenate function.
18. Numpy Class 10 : Arrange Function: Welcome everyone.
In today's class, we are going to discuss
about another function in NumPi that is A range
function in numPi. So if you want to create
random range of NumPi array, you have to use the
Arange function. So we are going to
create an array in the range N equal t NB dart, and then you have to type
the function A range. A range will be the
function for creating the range of array for that, you have to type the value ten. We are going to create
ten value NumPi RA. So if you try to run the code, you can see zero, one, two, three, four, five,
six, seven, eight, nine, that's the range of ten. So you have to remember
the concept of index. So the index starts from zero. So zero to nine, it will be considered
as ten values. We are going to see
another example, we are going to create
the range of 20, so you have to type 20 code, so we can see zero to
19 values are present. So 19 values are present
because zero starts. So that's the first index. In today's class, we discussed about A range punks
and in Python. So A range is nothing, but we are going to
create the range of RA.
19. Matplotlib Class 1 : Import Package: Welcome, everyone to the
first class of Matt Plat Lip. In today's class we are going to discuss in today's class, we are going to
discuss about how to install and import the
package of Matt Platlip. So matplot lip is very, very useful for
data visualization. So the data visualization
like creating graph, creating a bar chart, creating a pipe chart or
creating a scatter plot, we are going to need the
help of Mat plotlip. So first, we are going to
discuss about how to install the package for that you
have to type pip install, and then you have to type
the package name MD plotlip. So you have to run the code. So you can see, MD plotlip is already installed in my
Python three pine ten. After that, we are going to
discuss about how to import the package for MT plot
you have to type Import. So that's the keyword input, and then you have to
type the package name matplotlib dot, we are going to use
the sub package Pi plot for creating
the bar chart Pi chart. As PLT, we are going to
call matplot lip as PLT. Pi plot is one of the sub
package in matplot lip, you have to run the
code, so you can see package is
imported successfully. So after that, we
are going to impo the dataset for
the mad plot lip. For the data set, we are going to need
the help of pandas. So you have to type Pandas
import pandas as pd. And then we are going
to read our CSV file, which have been discussed in
the previous Pandas course. You have to type the
value data equal to. So you have to type the
variable data equal to pd dot, read, underscore CSV. So that's the syntax for
reading the CSV file. You have to type
the CSV file name. So you have to run the code. So that's it. So after that, we are going to
print our CSV file. So in the output, you can see the CSV file columns and values. In today's class, we
are discussed about how to install the
MD plotlip and how to import the
MD plotlip package and also Panda's package.
20. Matplotlib Class 2 : Title Function: However, in today's class, we are going to
discuss about how to create title for our graph. So in the previous class, we discussed about how to
create title for As and Vyxs. In today's class,
we are going to create title for our graph. So we are going to
use the same graph created in the previous class, and then you have to
type the function title. For that, you have to
type PLT dot title of. So inside that, you have to type your own title so you can
type colors and pulse graph. So after that, you
have to run the code. So you can see in the
output colors and pulse graph presented at
the title of our graph. So this graph shows
that it created for the color rays and the
pulse from our CSV five. So that's the use
of title function. If you want to create title, you have to use title.
21. Matplotlib Class 3 : xlabel ylabel: Welcome, everyone.
In today's class, we are going to discuss
about how to find the *** and Y axis in our graph. So in the previous class, we had discussed about how
to create a simple graph. So in that graph, we cannot find the sis and Y axis properly. For that, we are going
to need the help of X label and ylabel function. So X label is for the Acis and
Y label is for the Y axis. So we are going to create the same graph we created
in the previous class. So you have to copy and paste. And then we are going to
type plt dot X label. For the naming of the X axis, you have to type the
title of the Talis. So Caloris is the Acis. And then Y label is
nothing but Yaxis and then you have to
type the title of the axis. That is pulse. And then we are going to sow our graph using the so function. You to run the code. So in the output, you
can see the title for the As and the Oaxis. So As is the calories, and the Yaxis is the pulse.
22. Matplotlib Class 4 : Linestyle & Linewidth: Welcome, everyone.
In today's class, we are going to discuss
about how to use line style and line
width for our graph. So you have to copy and paste. And then in the graph, you have to type Camma, and then you have
to type line style. So line style is very useful
for the type of line. That is example
like dotted line, strong line, dash line. So these are the
types of line styles. First, we are going to
see about dotted lines. So you have to run the code. So in the output, you
can see our line style is changed to dotted line style. So in the previous output, it is single line. In today's output, it will be
considered as dotted line. Also, you can create
das line also. So in the output, you can
see das dash das lines. And then we are going
to see the last solid. So solid is the default
so in the previous class, we have created the
solid line style. So after that, we are going
to discuss about line width. Line width is useful for
increase the width of the line. So I have to type line width equal 20 line width equal to 20. So our line width will
be increased by 20. And then you have
to run the code. In the output, you can see
line width or increase. So if you want to decrease, you can type decrease value. Ten, we are going
to find the ten. So ten also not
suitable for our graph. So the correct value will be three So three also
suitable for our graph. So that's the use of line
width and line style.
23. Matplotlib Class 5 : Marker Function: Welcome everyone.
In today's class, we are going to
discuss about how to create a marker in our graph. For that, we are going
to discuss an example. In the previous class, we have
created the simple graph. Inside that you cannot see a marking point of
the XSS and Ss. For that, we are going
to need the help of marker function in math
have to type PLT dt. So PLT is the matplot
lip plot off, you have to type
the columns data inside the square bracket, you are going to create
colors as XAs and data of and then you have to type the second axis Y axis value, pulse, and then you have to
type the marker function. Marker equal t, you can
type your own symbol. So first, we are going to
create a marker of star. And then you have to create a so function to
display the graph. So you have to run the code. So you can see the
marker is placed between both Xs and Ys
intersection point. So you can see 201110. So marker is placed, and then you can see
the values placed between Xs and Yaxs intercept. So can also create your
own symbol of marker. Whatever symbol you
type inside the marker, it will generate in the output. So most of them uses
point for the marker. So we are going
to use the point. So in the output, we can see the points are placed
between the intercept. For the color is the As
and the pulse is the OAs. So the color is started from
195 and ended with 480. So you can see the XA values
started 200-400 or 550. And then pulse is
the Oaxs started from 98 and ended with 120. So you can see the values started with 95 and
ended with 130. So based on the values
of the *** and ***, marker is placed
between the intersect.
24. Matplotlib Class 6 : Show Function: Welcome everyone to the second
class of Matt plot lip. In today's class, we
are going to create a simple graph using
the so function. So so function is very, very useful for
displaying the graph. So you have to
type PLT dot plot, and then you have to type
the values of the CSV file. So you have to type
the column name. So we are going to
use the duras and column and then pulse column for creating our graph so you have to type inside
the square bracket, you have to type
the column name. So column will be duration. So you have to type, correct, and then and then theta equal, and then theta of pulse. And then we are going to use the so function PLT dot so off. So in the output, you can see the graph for the two columns,
dursin and pulse. So in the X axis, it will be the dursin. The Y axis will be the pulse. So we have created the simple
graph for our CSV file. So the points can be vary based on the
values of the columns.
25. Matplotlib Class 7 : Barplot: Welcome, everyone.
In today's class, we are going to discuss about
bar plot in matplot lip. So bar plot is one of the
type of plots in matplot lip. For that, we are going
to see an example how to create bar plot
in matplot lip. For that, you have
to type PLT dt bar. So that's the syntax
bar, o to type bar. Inside that you have
to type the columns. So column will be calories. So you can type your own columns from the CSB five and then data, and then you have to type
the second column pulse. After that, we are going
to display our bar plate. You can see in the output, bar plot is created
using the matplot lip. So if you want to increase
the width of the line, you have to use width
function in matplot lip. So you have to type
with the equaltivet. So by doing that, the line
width will be changed. So you can see line
width is changed. So after that, we
are going to copy all the values we are created
in the previous class. So you have to copy and
paste and then run the code. So you can say your title
as oxis are created. So our bar plot is created
using our previous class. So the syntax is
nothing but dot bar. And then we are going
to discuss about how to change the color
of the bar plot. For that, you have
to type the color equal to single hyphen. See how to type your wwn colors, whether it can be red, yellow, black or white, you can
type your wwn color. After that, you have to print, you can see you changed
the color of the bar plot. So you can also change the
colors, whatever you want. So if you want to sew two or
more colors in the bar plot, you have to create
square bracket. Inside that, you have
to type the colors. So you can see green and
red sewn in the output. So after that, we are
going to discuss about how to increase the width and
height of our bar plot. For that, we are going to create a function that is figure size. So you have to type
PLT dot, figure. And then bracket
inside the bracket, you to type fix size
equal open bracket. Inside that, you have to
type the width under height. So width can be ten,
height can be five. So after that, o to print, you can see your width and the height of the bar
plot is increased. So figure size can be
very, very useful for. If you want to increase
the width and height of your bar plot or Pie
chart or any other chart, you have to use the figure size. So in today's class, we discussed about how to create a bar plot in MT plotlip. So other chart can also be
easily created in MT plot lip. Instead of typing the bar name, you have to type the Pie
chart or scatter plot name. Then scatter plot Pie chart will be generated
in your output. So matplot lip is very, very useful for
data visualization.
26. Data Science Project: Class of Data Science project. For the Data Science project, we are going to
create a new project called Google Search Analysis. So Analysis is one of the important topics
in data science. For that only, we
are going to create the project, Google
Search analysis. So you have to open the
folder with VSCode, or you can use any other
IDE for your project. I'm going to use VSCode so
after opening the VS code, you need to install the
important extensions. So for running your project, you need to install this, so you have to select
the extension. So in that first, you have to download the Jupiter extension. So you have to type Jupiter. So you have to wait further. So after that, you
need to install this extension in your VS code. So you have to install this. So after installing
the Jupiter extension, you need to install the Python. So for running our
project, we need Python. So for that, you have
to install the Python. So you have to install
the extension of Python. So these two extension are very, very important for our project. So after that, you need
to create a new file, and then you have to type
the file extension IPYNB. So that's the
extension for Jupiter. So you have to wait for the Jupiter extension to
be loaded in your VS code. Okay, guys, we are
going to create our Google Search analysis
data science project. Before running our project, you need to install the
important packages. So for that, you need
to type, Pip install. You have to type,
Pip install Pitrens. So Pitrens is very, very useful for finding
the Google Trends data. So Google Trends contains all the details of
the Google search. For that only, you need Pi trends for collecting the
data from the Google Trends. So you need to
install this package. Before that, you need to select
your Python environment. That is Python interpreter. I'm going to select
three Pi Nian. So after that only, you have to install the package. So after installing the package, you have to import the packages. So in the first class,
we are going to discuss about how to
import the packages. So first, we are going to import the package that is Pandas. So Panda is for data
manipulation in data science. And then we are going to use the Pi trends for collecting the information
from the Google Trends. We are going to request the
data from Google Trends. For that only you have to type Pitrens dot request,
Import trend request. We are going to request the
data from the Google Trends. And then you have to import a matplot lip for
data visualization, it is one of the important
tool in data science. We are going to use the Pi plot for plotting our diagrams. And then we are going to use
the variable for the trend Q so trend request request the data from the Google Trends. So Pandas for data manipulation, and then Pi trends
for collecting the information from the
Google Trends and then MT Plotlp for data visualization like creating the
bar chart, Pi chart. And then we created the
variable for trend request. You need to run the core. So you can see all the packages
are successfully installed. So that's it. In today's
class we are discussed about how to create a new
file for our project, and also we discussed
about how to install the Pitrens and also we discussed about how to
import the packages. In the upcoming classes, we are going to
analyze our Pitrens. So let's see you
in the next class. Welcome, everyone.
In today's class, we are going to analyze
our Google search. So using the Pitrens
so far that, we are going to see the
example how to analyze it. So you have to type
trans dt, build payload. You have to type, build payload of you have to type the keyword. That is keyword list. So if you want to find any important keywords from the Google search,
you can use that. I'm going to search for
the keyword data science. If you want to search
for Missing learning, you can type Missing learning. If you want to
search for any game, any movies, any musics, you can type those keywords. I'm going to search
for data science. So you have to
type data science. So trends dot inter
interest by region. So interest by region
is nothing but what are all the countries such as the
word data sins frequently? So that's how we are to analyze. For that only we are using
the interest by region. And then you have to
create the variable data equal to data dot sort. We are going to sort the values
in the descending order. So the first value will be the most searched word
data sins by the country. So most words searched
by the country. So the word is data science. So we are going to
descending order the countries who are
searching the word data since. So we have to type
ascending equal to falls. So ascending equal
to falls is nothing, but we are going to save the
words by descending order. And then we are going to
print the top ten values. After that, we are going
to print the data. So that's it. So first, we are using the trends for finding
the keyword data science. So we are going to search for the word data science
in the Google search. And then by region, which country search
the word data science. After that, we are sorting the countries by
descending order. Most search value will be in the first and then we are
going to print the data. So before running your project, you need to type Pi
trends dot build. So trench dot bill
will show error. For that, only we need to type PitrensPtrens dot bill load, and then interest by region. After that, you need
to run the code. So you can see
Zimbawave searches the word data signs
most frequently. Then India, Ethiopia, Kenya, Singapore, China, and Nigeria. And also, you can
change the keyword if I want to find
the word signs, search by the most countries you need to change the
code and run the code. Before that, you need
to save the code. And then you can see, India searches the word
signs most frequent. So that's how India in the first order and then
Pili finds Ghana, Nepal. And then I'm going
to change the word to artificial
intelligence. That is AI. So we are going to find which country searches
the word AI frequently. So you can see Vietnam searches
the word AI frequently, and then China, Romania,
Italy, Myanmar. So that's it. So that's
how we can search our words using the
patterns. Welcome, everyone. In today's class, we are
going to discuss about how to provide visualization for
our Google search analysis. So visualization is like
bar chart, Pie chart. So for that, we are
going to see the example for how to create those
bar chart and Pie chart. So you need to type these codes. So you have to type
data Equalter trends, request of Hutch heading. That's it. Heading
h equal English. Us. Come on. T T is nothing but time zone. So time zone will be
UPC. So that's it. And then we are going
to and then we are going to use the payload,
that is the keyword. So the keyword can
be your own choice. So the keyword can
be your own choice. I'm going to type data signs. So after that, we are going
to create data equal to, data dot interest by
interest over time. So we are going to
use which year, which month the word is
most frequently searched. For that only we are using
the interest over time. And then figure
comma xi is equal to Plot. That is Pi
plot that subplots. We are going to create
subplots in then size. And then you have to
provide the size, figure size, figure
size equal to. You need to type the width
and height 15 Gamma toll. After that, you need
to provide the column. So the column will
be theta sines. Data of theta sine. So keyword data
sines and then plot. We are going to create a plot. And then plot dot style. We are going to provide
the style for our plot. So you need to type
plot dot style dot of, and then you have
to type the style. I'm going to type fi, I'm going to type the style 538. So this is one of
the style present in the data visualization
of Matt plot lip. And then I'm going
to type the title for my data visualization. You have to type your own
title, total searches. You can type your own title. And then we are going to provide the XAs title and
then YSS title. For that, you have to
type plot dot X label. X label is nothing but ASIS. And then you have to
provide the title here. Xs will be here. And then YXis that
is Y label of, and then YXis will
be total count. And then we are going
to sew our plot, so off. So that's it. We can use Mt plotlip
for data visualization. First, we are created the
language, that is English. And then we are
created the keyword, that is data science. And then we are using
the interest over time. So in which year the
words are more frequent. And then we are going
to create the subplots. You have to provide
the width and height for the subplots. And then we are going
to create the plot for our data science keyword. And then we are using
the style that is 538, and then we are going
to provide the title for Xaxis and then SS. At last we are just
so our output. So you can see in the output
in the year 2020 from 2024, the word data science
is most frequent in the year 2022 to 2023. So between these two years, the word data science is
most frequently used. So if I change the word to
AI or missing learning, I'm going to type AI, and then I'm going
to run the code. So you can see in the
year 2023 to 2024, between these two ranges, the word AI is most
frequently searched. So because most of the people
are using AI nowadays. So that's why you can see
the peak of the AI word. So you can type your own words, and then you can analyze those
words using the Py trends. So that's it. Our
project analysis is completed successfully. Using the Py trends, you can analyze
the Google search. The first class we are discussed about how to import
the packages. In the second class, we created the word AI and Mine learning are data signs
used by the region that is the country which
uses the word frequently. And then in the last class we discussed about how to create this visualization for the
word made data science. So you can see the
visualization over the years. And then you can see
the count of the words. Hope you learn something
from this course. If you learn
something from this, please put positive review
in the command section. So let's see on
the next project.