DataScienceAndBigDataAnalytics/Codes/Code-A9 (Data visualisation-2).md
2025-01-24 11:18:33 +05:30

337 B

A9 - Data visualization-2


  1. Import library
import seaborn as sns
  1. Set dataframe
df = sns.load_dataset("titanic")
df
  1. Boxplot
sns.boxplot(x="sex", y="age", data=df, hue="survived")
  1. Catplot
sns.catplot(x="sex", hue="survived", data=df, kind="count")