From 4903739c43c5535d02abb0b6c0e6019fb10592f9 Mon Sep 17 00:00:00 2001 From: FloraSauerbronn Date: Fri, 26 Jul 2024 12:27:45 -0300 Subject: [PATCH] Fixing mistakes from notebook 01 --- notebooks/01-plotting_intro.ipynb | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/notebooks/01-plotting_intro.ipynb b/notebooks/01-plotting_intro.ipynb index f302377..b6c2dd8 100644 --- a/notebooks/01-plotting_intro.ipynb +++ b/notebooks/01-plotting_intro.ipynb @@ -165,16 +165,11 @@ "from IPython.display import HTML, display\n", "\n", "# Group by latitude and longitude\n", - "grouped = (\n", - " df\n", - " .groupby([\"latitude\", \"longitude\"])\n", - " .size()\n", - " .reset_index()\n", - " .drop(columns=0)\n", - ")\n", + "grouped = df.groupby([\"latitude\", \"longitude\"]).size()\n", + "clean_grouped = grouped.reset_index().drop(columns=0)\n", "\n", "# Display unique latitude and longitude pairs in a scrollable table\n", - "unique_pairs = grouped[[\"latitude\", \"longitude\"]]\n", + "unique_pairs = clean_grouped[[\"latitude\", \"longitude\"]]\n", "\n", "# Reset index to include it in the DataFrame\n", "unique_pairs = unique_pairs.reset_index()\n", @@ -202,10 +197,10 @@ "metadata": {}, "outputs": [], "source": [ - "# Primeiro plot para Temperatura x Profundidade\n", + "# First plot with temperature x pressure\n", "fig, ax = df.plot_ctd(idx=0, var=\"temperature\", color=\"blue\")\n", "\n", - "# Segundo plot para Salinidade x Profundidade usando o mesmo eixo\n", + "# Second plot adding salinity x pressure to the same axis\n", "fig, ax = df.plot_ctd(idx=0, var=\"salinity\", ax=ax, color=\"red\")" ] }