From 26528ebce2b0ac371ca1d5e435bd5d70086071ec Mon Sep 17 00:00:00 2001 From: Maik Fruhner Date: Mon, 27 May 2024 08:52:47 +0200 Subject: [PATCH 1/3] Fix 5-1 df.corr() call to match 2.0 default parameters --- 5-Clustering/1-Visualize/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-Clustering/1-Visualize/README.md b/5-Clustering/1-Visualize/README.md index cbff4726ca..88fcd37282 100644 --- a/5-Clustering/1-Visualize/README.md +++ b/5-Clustering/1-Visualize/README.md @@ -258,7 +258,7 @@ Note, when the top genre is described as 'Missing', that means that Spotify did 1. Do a quick test to see if the data correlates in any particularly strong way: ```python - corrmat = df.corr() + corrmat = df.corr(numeric_only=True) f, ax = plt.subplots(figsize=(12, 9)) sns.heatmap(corrmat, vmax=.8, square=True) ``` From 67c605fab397d9bd20a9c4f41d8b6628d73cb96e Mon Sep 17 00:00:00 2001 From: Maik Fruhner Date: Mon, 27 May 2024 09:14:54 +0200 Subject: [PATCH 2/3] Fix 5-1 sns.FacetGrid call to match sns 0.13 API --- 5-Clustering/1-Visualize/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-Clustering/1-Visualize/README.md b/5-Clustering/1-Visualize/README.md index 88fcd37282..b862b45a36 100644 --- a/5-Clustering/1-Visualize/README.md +++ b/5-Clustering/1-Visualize/README.md @@ -300,7 +300,7 @@ Are these three genres significantly different in the perception of their dancea 1. Create a scatter plot: ```python - sns.FacetGrid(df, hue="artist_top_genre", size=5) \ + sns.FacetGrid(df, hue="artist_top_genre", height=5) \ .map(plt.scatter, "popularity", "danceability") \ .add_legend() ``` From 890cf47657d827394e6ace9df055732edc2cb557 Mon Sep 17 00:00:00 2001 From: Maik Fruhner Date: Wed, 29 May 2024 09:49:46 +0200 Subject: [PATCH 3/3] Fix 5-2 Seaborn Lineplot call --- 5-Clustering/2-K-Means/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-Clustering/2-K-Means/README.md b/5-Clustering/2-K-Means/README.md index 18a08fdd63..5fe6eb7490 100644 --- a/5-Clustering/2-K-Means/README.md +++ b/5-Clustering/2-K-Means/README.md @@ -169,7 +169,7 @@ Previously, you surmised that, because you have targeted 3 song genres, you shou ```python plt.figure(figsize=(10,5)) - sns.lineplot(range(1, 11), wcss,marker='o',color='red') + sns.lineplot(x=range(1, 11), y=wcss, marker='o', color='red') plt.title('Elbow') plt.xlabel('Number of clusters') plt.ylabel('WCSS')