From 0183b787c82e6064b767db580699d4c1493afe48 Mon Sep 17 00:00:00 2001 From: "Eric O. LEBIGOT (EOL)" Date: Mon, 14 Aug 2017 23:42:37 +0200 Subject: [PATCH 1/2] Update modern_2_method_chaining.ipynb Most of the flight delays are concentrated in [-50; 50]. The previous scale made their box plot distribution essentially illegible. --- modern_2_method_chaining.ipynb | 1 + 1 file changed, 1 insertion(+) diff --git a/modern_2_method_chaining.ipynb b/modern_2_method_chaining.ipynb index 0229160..79dbe0a 100644 --- a/modern_2_method_chaining.ipynb +++ b/modern_2_method_chaining.ipynb @@ -427,6 +427,7 @@ "fig, ax = plt.subplots(figsize=(15, 5))\n", "sns.boxplot(x='turn', y='dep_delay', data=flights, ax=ax)\n", "sns.despine()" + "ax.set_ylim(-50, 50)" ] }, { From f4e3c569ce6e6438f297464f915335c3324de007 Mon Sep 17 00:00:00 2001 From: "Eric O. LEBIGOT (EOL)" Date: Tue, 15 Aug 2017 00:03:19 +0200 Subject: [PATCH 2/2] Fix for "MultiIndex Slicing requires the index to be fully lexsorted" exception Fixed a "MultiIndex Slicing requires the index to be fully lexsorted" exception raised with the latest Pandas and Seaborn versions. --- modern_3_indexes.ipynb | 1 + 1 file changed, 1 insertion(+) diff --git a/modern_3_indexes.ipynb b/modern_3_indexes.ipynb index 8d59efa..1f5f68b 100644 --- a/modern_3_indexes.ipynb +++ b/modern_3_indexes.ipynb @@ -653,6 +653,7 @@ "source": [ "airports = ['W43', 'AFO', '82V', 'DUB']\n", "\n", + "weather.sort_index(inplace=True)", "g = sns.FacetGrid(weather.loc[airports].reset_index(),\n", " col='station', hue='station', col_wrap=2, size=4)\n", "g.map(sns.regplot, 'sped', 'gust_mph')"