Data Visualization On Pandas - Jupyter Notebook
Data Visualization On Pandas - Jupyter Notebook
Create Plots
1. Line plot: To plot a line plot, you need to have at least one numeric column in your
DataFrame.
2. Bar plot: The DataFrame must have at least one categorical column.
3. Histogram: in histogram need numeric column to plot.in histogram need at least one
numeric column to plot,The numeric column must be specified as the x parameter.
4. Scatter plot: A scatter plot can have two numeric columns or two object columns.
5. Box plot: The DataFrame must have at least one numeric column.,The numeric column
must be specified as the x parameter.
6. Pie chart: The DataFrame must have at least one numeric column.
7. Heatmap: A heatmap can have two numeric columns or two object columns.
1. Line plot:
In [4]: df.head(2)
Out[4]:
Age
User_ID Cust_name Product_ID Gender Age Marital_Status State Zon
Group
In [5]: df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 11251 entries, 0 to 11250
Data columns (total 15 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 User_ID 11251 non-null int64
1 Cust_name 11251 non-null object
2 Product_ID 11251 non-null object
3 Gender 11251 non-null object
4 Age Group 11251 non-null object
5 Age 11251 non-null int64
6 Marital_Status 11251 non-null int64
7 State 11251 non-null object
8 Zone 11251 non-null object
9 Occupation 11251 non-null object
10 Product_Category 11251 non-null object
11 Orders 11251 non-null int64
12 Amount 11239 non-null float64
13 Status 0 non-null float64
14 unnamed1 0 non-null float64
dtypes: float64(3), int64(4), object(8)
memory usage: 1.3+ MB
2. Bar Plot
3. Histogram
4 Scatter plot
5. Box plot: