DataFrame
The data frame is another type of data collection. the pandas module while load the CSV file into the data object.
import pandas as pd
data = pd.read_csv('score_data.csv')
data
structure of this data we've got our data structured in both rows and columns rows and columns
Now as a challenge can you find out what the type of this data variable is.
Now above show, this data type is the data frame, and also we can display single column data in the dataset. I hit shift enter Jupiter a notebook will display to me that data inside the single column. after this type of example got the idea too much similar syntax of the list, array, and data frame.
In the data frame, you have to collect the one column values into a different variable.
After creating a new column now see the datatype.
But how we are adding a new column to an existing data frame,
how to manipulate the values of a column?, This is very very useful.
The above example calculation also called the overwrite value of the column.
Series
the series always only one column, which means it had only has a single dimension. The series is can't support the matrix value and any operation of matrix.it’s vary powerful and much more restrictive. data frames a panda's data frame is essentially made up of a collection of series. In the data frame structure every single column is a series.
We can also create a list called columnists and put two pieces of data inside of it.
In the python it very easy to define the data frame and series, when we assign the column to the variable with ‘[]’(one pair of square brackets), we are passing as string and datatype show as series. We assign ‘[[]]’(two pairs of square brackets) then it's passing as a data frame.
The python provide also same patter for delete the column as same as the list and series.