Skip to content

Commit

Permalink
Fixing mistakes from notebook 01
Browse files Browse the repository at this point in the history
  • Loading branch information
FloraSauerbronn committed Jul 26, 2024
1 parent bed27ee commit 4903739
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions notebooks/01-plotting_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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\")"
]
}
Expand Down

0 comments on commit 4903739

Please sign in to comment.