Skip to content

Commit 35b0b47

Browse files
remove argument equals whitespace: clustering
1 parent 0f5b7e4 commit 35b0b47

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/clustering.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ in the clustering pipeline.
182182
```{code-cell} ipython3
183183
:tags: [remove-cell]
184184
penguins_standardized = penguins.assign(
185-
bill_length_standardized = (penguins["bill_length_mm"] - penguins["bill_length_mm"].mean())/penguins["bill_length_mm"].std(),
186-
flipper_length_standardized = (penguins["flipper_length_mm"] - penguins["flipper_length_mm"].mean())/penguins["flipper_length_mm"].std()
185+
bill_length_standardized=(penguins["bill_length_mm"] - penguins["bill_length_mm"].mean())/penguins["bill_length_mm"].std(),
186+
flipper_length_standardized=(penguins["flipper_length_mm"] - penguins["flipper_length_mm"].mean())/penguins["flipper_length_mm"].std()
187187
).drop(
188-
columns = ["bill_length_mm", "flipper_length_mm"]
188+
columns=["bill_length_mm", "flipper_length_mm"]
189189
)
190190
```
191191

@@ -261,7 +261,7 @@ kmeans = KMeans(n_clusters=3)
261261
262262
penguin_clust = kmeans.fit(penguins_standardized)
263263
264-
penguins_clustered = penguins_standardized.assign(cluster = penguin_clust.labels_)
264+
penguins_clustered = penguins_standardized.assign(cluster=penguin_clust.labels_)
265265
266266
colored_scatter_plot = alt.Chart(penguins_clustered).mark_circle().encode(
267267
x=alt.X("flipper_length_standardized", title="Flipper Length (standardized)"),

0 commit comments

Comments
 (0)