Define Pandas
Pandas is an powerful library in Python Programming library. It used to create multi dimensional structured data like 2D structured data its represent rows and columns like table format.
Operation in Pandas
- Create one dimensional array
- Loading Data
- Exploring Data
- Data cleaning and preprocessing
- Data Transformation
- Merging and Joining Data
- Visualization
1.Create the One dimensional array
One dimensional array
One dimensional array is used to hold the data in any data type like [ string, integers, float, etc]
Example
Two dimensional array is used to hold the data in any data type like a row and column in table format
Example
2.Loading Data
A pandas can used to read the any file format like CSV, Excel, JSON etc
3.Exploring Data
Once the data can be load into the data frame , You may be inscept the content and structure.
df.describe ()
It provide the max, min, mean operation
df.head()
It return first five elements
df.tail()
It return last five elements
4.Data cleaning and Preprocessing
df.isnull()
This function can return the boolean dataframe
dropna()
It used to remove the row and columns missing value
fillna()
This function is used to missing value they can be assign random value to the null position
5.Data Transformation
1. df.sort_values()
It used to sorting the elements in ascending or descending order.
6.Merging and Joining Data
concat()
This function is used to concatination to vertical and horizontal in table row =0, columns=1
merge()
This function can be used to merge the row and column in tables
7.Visualization
Pandas integrates well with matplotlib and other plotting libraries for simple data visualization.
Example
Line graph, Bar plot, Histogram
Post a Comment