Skip to content

Commit

Permalink
minor code updates
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-huber committed Dec 20, 2023
1 parent 2557d12 commit 6543180
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions notebooks/live_coding_05_correlation_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -689,11 +689,13 @@
],
"source": [
"fig, ax = plt.subplots(figsize=(8, 8))\n",
"sb.heatmap(data.corr(), vmin=-1, vmax=1,\n",
" square=True, lw=2,\n",
" annot=True, cmap=\"RdBu\",\n",
" ax=ax,\n",
" )"
"sb.heatmap(\n",
" data.corr(numeric_only=True), # this is required for pandas >= 2.0, but also generally a good idea.\n",
" vmin=-1, vmax=1,\n",
" square=True, lw=2,\n",
" annot=True, cmap=\"RdBu\",\n",
" ax=ax,\n",
")"
]
},
{
Expand Down Expand Up @@ -861,7 +863,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions notebooks/live_coding_07_dimensionality_reduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,7 @@
" y=\"tsne2\",\n",
" hue=features[i],\n",
" palette=\"viridis\",\n",
" ax=ax, size=1)\n",
" ax=ax)\n",
" \n",
" ax.set_xticks(ticks=[])\n",
" ax.set_yticks(ticks=[])\n",
Expand Down Expand Up @@ -1924,7 +1924,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 6543180

Please sign in to comment.