From 79dd2b3ec888137a44d39cde9a36d57d97e0985e Mon Sep 17 00:00:00 2001 From: Kshitij Date: Fri, 24 Jan 2025 11:18:33 +0530 Subject: [PATCH] Added code for a9. --- Codes/Code-A9 (Data visualisation-2).md | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Codes/Code-A9 (Data visualisation-2).md diff --git a/Codes/Code-A9 (Data visualisation-2).md b/Codes/Code-A9 (Data visualisation-2).md new file mode 100644 index 0000000..45c842e --- /dev/null +++ b/Codes/Code-A9 (Data visualisation-2).md @@ -0,0 +1,31 @@ +# A9 - Data visualization-2 + +--- + +1. Import library + +```python3 +import seaborn as sns +``` + +2. Set dataframe + +```python3 +df = sns.load_dataset("titanic") +df +``` + +3. Boxplot + +```python3 +sns.boxplot(x="sex", y="age", data=df, hue="survived") +``` + +4. Catplot + +```python3 +sns.catplot(x="sex", hue="survived", data=df, kind="count") +``` + +--- +