Hi everyone, and welcome to our six module,
which will be focused on data analysis in pandas.
Okay. To introduce our module first,
we will learn what is pandas data frame and what are, uh,
panda series.
We'll learn how to get initial information about them and how to work with the
most common data audit, uh, methods. We'll learn, uh,
what are pandas data types, which are supported and how to cast them.
We'll learn about this index, the multi-index and how to work with it.
We'll also learn the most common data frame operations, like, uh,
how to create new column or rename columns, how to filter columns or roles,
how to change values based on some condition and so on.
We'll learn how to work with apply method. Also,
very important is to know how to merge data frames. Also,
how to summarize data with pivot table,
cross up and using group. And lastly,
we will learn how to style data frames in Jupyter Notebook.
Now let's talk about the Pandas data frame and series.
Let's go to our notebook in the module six folder.
It'll be better to explain you all the concepts.
So what is pandas data frame? It is the most important pandas class.
Basically, it is a two dimensional data structure,
like a matrix or a two dimensional array or a
table with rows and columns.
You can also say it is a higher level of wrapper around MPI arrays.
And this higher level of functionality provides us easier way how to work with
the data. It also consists of multiple panda series as well.
Uh, basically if we filter only one column or one row, for example,
we will get a panda series,
both panda series and data frame share.
Some of the methods which you can apply on them,
and some are specific just to data frame or series.
Now, how to create a pandas data frame in Python.
Uh, the most common way how to do it, it is with, uh, from dictionary method,
which creates a data frame from a Python dictionary where the keys
are column names and the lists are the values for each of the columns.
Uh, we can create a pandas data frame also from, uh,
lists of dictionaries around this. So
we can create a pandas data frame also from a list of dictionaries
using from, uh, recourse method. Uh,
where each item in the list is a dictionary where the key is the column name
and the value is the value for this specific row and column.
As I mentioned before,
the data frame is a higher level wrapper around MPI array.
We can get the MPI array with data frame values.
Uh,
to work with MPI arrays is more difficult than to work with panda data frame or
series, but I recommend to you at least learn the basics.
Each data frame has its, uh, index. Uh,
these are the numbering of the rows. Here.
We can see in bold and columns,
uh, the index of the rows. Uh, it doesn't have to be just numbers,
it might be strengths as well. We also see that when we refer,
uh, to columns or the index, uh, we'll get a index class.
In return, we can turn, uh,
the index tool list with the tool list method.
Okay, now what are Pandas series? Uh,
panda series is uh, one dimensional array or one column,
or one vector we can say as well. Uh,
the easiest way how to create them is using, uh, cut.
The easiest way how to create them is using a list. We can create them this way.
Panda series can have a name, uh,
same as column in a pandas data frame.
It is also an index. We can see it here.
And we see the difference that the name of the series is just, uh, one string,
but the index is uh, also a range index class,
and we can turn it into list as well.
In our next video,
we will learn how to load our data into Panta data frames.