Explain how to Plot categorical data using seaborn?
MACHINE LEARNING RECIPES DATA CLEANING PYTHON DATA MUNGING PANDAS CHEATSHEET     ALL TAGS

Explain how to Plot categorical data using seaborn?

Explain how to Plot categorical data using seaborn?

This recipe explains how to Plot categorical data using seaborn

0

Recipe Objective

Plot categorical data using seaborn.

Categorical data is data which are having repeating values present in it the values could binary or numerical or string values, for e.g. Male and female, 0 and 1, True and false and more. Lets understand how to visualize them.

Step 1 - Import the necessary values

import seaborn as sns import matplotlib.pyplot as plt

Step 2 - load the dataset

titanic_data = sns.load_dataset('titanic') titanic_data.head()

Step 3 - Plot the graph with different examples

sns.catplot(x='survived',y='age', data=titanic_data) sns.catplot(x='survived',y='age', kind="swarm", data=titanic_data) sns.catplot(x='survived',y='age', jitter=False, data=titanic_data)

Here from the above figures: x - denotes which variable to be plot on x-axis y - denotes which variable to be plot on y-axis data - denotes the Sample data name that we have taken. kind - denotes which type of graph we want for plotting for e.g bar, scatter, violin etc.

Relevant Projects

Predict Macro Economic Trends using Kaggle Financial Dataset
In this machine learning project, you will uncover the predictive value in an uncertain world by using various artificial intelligence, machine learning, advanced regression and feature transformation techniques.

Learn to prepare data for your next machine learning project
Text data requires special preparation before you can start using it for any machine learning project.In this ML project, you will learn about applying Machine Learning models to create classifiers and learn how to make sense of textual data.

Solving Multiple Classification use cases Using H2O
In this project, we are going to talk about H2O and functionality in terms of building Machine Learning models.

Walmart Sales Forecasting Data Science Project
Data Science Project in R-Predict the sales for each department using historical markdown data from the Walmart dataset containing data of 45 Walmart stores.

Zillow’s Home Value Prediction (Zestimate)
Data Science Project in R -Build a machine learning algorithm to predict the future sale prices of homes.

Music Recommendation System Project using Python and R
Machine Learning Project - Work with KKBOX's Music Recommendation System dataset to build the best music recommendation engine.

Choosing the right Time Series Forecasting Methods
There are different time series forecasting methods to forecast stock price, demand etc. In this machine learning project, you will learn to determine which forecasting method to be used when and how to apply with time series forecasting example.

Mercari Price Suggestion Challenge Data Science Project
Data Science Project in Python- Build a machine learning algorithm that automatically suggests the right product prices.

Forecast Inventory demand using historical sales data in R
In this machine learning project, you will develop a machine learning model to accurately forecast inventory demand based on historical sales data.

PySpark Tutorial - Learn to use Apache Spark with Python
PySpark Project-Get a handle on using Python with Spark through this hands-on data processing spark python tutorial.