Skip to content

Commit

Permalink
Update remaining read_feather
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Sep 24, 2024
1 parent b519132 commit 9d7790f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
8 changes: 6 additions & 2 deletions docs/tutorial/irrigation-demand.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@
"metadata": {},
"outputs": [],
"source": [
"df_basin = pd.read_feather(base_dir / \"Crystal-2/results/basin.arrow\")\n",
"df_basin = pd.read_feather(\n",
" base_dir / \"Crystal-2/results/basin.arrow\", dtype_backend=\"pyarrow\"\n",
")\n",
"\n",
"# Create pivot tables and plot for basin data\n",
"df_basin_wide = df_basin.pivot_table(\n",
Expand Down Expand Up @@ -393,7 +395,9 @@
"metadata": {},
"outputs": [],
"source": [
"df_flow = pd.read_feather(base_dir / \"Crystal-2/results/flow.arrow\")\n",
"df_flow = pd.read_feather(\n",
" base_dir / \"Crystal-2/results/flow.arrow\", dtype_backend=\"pyarrow\"\n",
")\n",
"# Add the edge names and then remove unnamed edges\n",
"df_flow[\"name\"] = model.edge.df[\"name\"].loc[df_flow[\"edge_id\"]].to_numpy()\n",
"df_flow = df_flow[df_flow[\"name\"].astype(bool)]\n",
Expand Down
8 changes: 6 additions & 2 deletions docs/tutorial/natural-flow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@
"metadata": {},
"outputs": [],
"source": [
"df_basin = pd.read_feather(base_dir / \"Crystal-1/results/basin.arrow\")\n",
"df_basin = pd.read_feather(\n",
" base_dir / \"Crystal-1/results/basin.arrow\", dtype_backend=\"pyarrow\"\n",
")\n",
"\n",
"# Create pivot tables and plot for Basin data\n",
"df_basin_wide = df_basin.pivot_table(\n",
Expand Down Expand Up @@ -453,7 +455,9 @@
"source": [
"# Plot flow data\n",
"# Read the flow results\n",
"df_flow = pd.read_feather(base_dir / \"Crystal-1/results/flow.arrow\")\n",
"df_flow = pd.read_feather(\n",
" base_dir / \"Crystal-1/results/flow.arrow\", dtype_backend=\"pyarrow\"\n",
")\n",
"# Add the edge names and then remove unnamed edges\n",
"df_flow[\"name\"] = model.edge.df[\"name\"].loc[df_flow[\"edge_id\"]].to_numpy()\n",
"df_flow = df_flow[df_flow[\"name\"].astype(bool)]\n",
Expand Down
8 changes: 6 additions & 2 deletions docs/tutorial/reservoir.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@
"metadata": {},
"outputs": [],
"source": [
"df_basin = pd.read_feather(base_dir / \"Crystal-3/results/basin.arrow\")\n",
"df_basin = pd.read_feather(\n",
" base_dir / \"Crystal-3/results/basin.arrow\", dtype_backend=\"pyarrow\"\n",
")\n",
"\n",
"# Create pivot tables and plot for Basin data\n",
"df_basin_wide = df_basin.pivot_table(\n",
Expand Down Expand Up @@ -329,7 +331,9 @@
"metadata": {},
"outputs": [],
"source": [
"df_flow = pd.read_feather(base_dir / \"Crystal-3/results/flow.arrow\")\n",
"df_flow = pd.read_feather(\n",
" base_dir / \"Crystal-3/results/flow.arrow\", dtype_backend=\"pyarrow\"\n",
")\n",
"# Add the edge names and then remove unnamed edges\n",
"df_flow[\"name\"] = model.edge.df[\"name\"].loc[df_flow[\"edge_id\"]].to_numpy()\n",
"df_flow = df_flow[df_flow[\"name\"].astype(bool)]\n",
Expand Down

0 comments on commit 9d7790f

Please sign in to comment.