Skip to content

Commit

Permalink
Update notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
robbibt committed Oct 18, 2024
1 parent a8b7adc commit 450f5f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions docs/notebooks/Model_tides.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
}
],
"source": [
"tide_df.reset_index([\"x\", \"y\"], drop=True).tide_height.plot();"
"tide_df.droplevel([\"x\", \"y\"]).tide_height.plot();"
]
},
{
Expand Down Expand Up @@ -288,7 +288,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 3/3 [00:00<00:00, 20.44it/s]\n"
"100%|██████████| 3/3 [00:00<00:00, 25.51it/s]\n"
]
},
{
Expand Down Expand Up @@ -445,7 +445,7 @@
],
"source": [
"# Print outputs\n",
"tide_df_multiple.reset_index([\"x\", \"y\"], drop=True).plot(legend=True)"
"tide_df_multiple.droplevel([\"x\", \"y\"]).plot(legend=True)"
]
},
{
Expand Down Expand Up @@ -481,7 +481,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 2/2 [00:00<00:00, 17.67it/s]\n"
"100%|██████████| 2/2 [00:00<00:00, 17.93it/s]\n"
]
},
{
Expand Down Expand Up @@ -685,7 +685,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 2/2 [00:00<00:00, 15.74it/s]\n"
"100%|██████████| 2/2 [00:00<00:00, 17.45it/s]\n"
]
},
{
Expand Down Expand Up @@ -785,7 +785,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 6/6 [00:00<00:00, 19.79it/s]\n"
"100%|██████████| 6/6 [00:00<00:00, 48.50it/s]\n"
]
},
{
Expand Down Expand Up @@ -971,7 +971,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 6/6 [00:00<00:00, 21.22it/s]\n"
"100%|██████████| 6/6 [00:00<00:00, 49.25it/s]\n"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions docs/notebooks/Validating_tides.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
}
],
"source": [
"gauge_df.reset_index(\"site_code\").sea_level.plot()"
"gauge_df.droplevel(\"site_code\").sea_level.plot()"
]
},
{
Expand Down Expand Up @@ -680,7 +680,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 3/3 [00:00<00:00, 21.59it/s]\n"
"100%|██████████| 3/3 [00:00<00:00, 25.57it/s]\n"
]
},
{
Expand Down Expand Up @@ -840,7 +840,7 @@
"joined_df = gauge_df.join(modelled_df).dropna()\n",
"\n",
"# Plot measured sea levels and modelled data\n",
"joined_df.reset_index([\"site_code\", \"x\", \"y\"])[[\"sea_level\"] + models].plot()"
"joined_df.droplevel([\"site_code\", \"x\", \"y\"])[[\"sea_level\"] + models].plot()"
]
},
{
Expand Down

0 comments on commit 450f5f8

Please sign in to comment.