Skip to content

Commit

Permalink
Fix bad column aliasing
Browse files Browse the repository at this point in the history
  • Loading branch information
mmore500 committed Nov 11, 2023
1 parent 7e87da3 commit 0a80dbc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pandas as pd


def rename_allocation(df: pd.DataFrame) -> pd.DataFrame:
df = df.copy()
df["Allocation"] = df["Allocation"].map(
{
"With lac-417": "Incl. lac-417",
"Sans lac-417": "Excl. lac-417",
}
)
return df
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
"outputs": [],
"source": [
"from conduitpylib.viz import _get_defaults as cfg\n",
"\n",
"from conduitpylib.viz import (\n",
" get_notomoji_font_path,\n",
" performance_semantics_scatterplot,\n",
" performance_semantics_facetplot,\n",
")\n",
"\n",
"from conduitpylib.wrangle import retrieve_and_prepare_delta_dataframes\n"
"from _rename_allocation import rename_allocation\n"
]
},
{
Expand Down Expand Up @@ -93,7 +93,7 @@
" group_df = group.reset_index()\n",
" tp.tee(\n",
" performance_semantics_scatterplot,\n",
" data=group_df,\n",
" data=rename_allocation(group_df),\n",
" x=\"Simstep Period Inlet (ns)\",\n",
" y=\"Latency Simsteps Inlet\",\n",
" legend_font_name=get_notomoji_font_path(),\n",
Expand Down Expand Up @@ -123,12 +123,7 @@
" with pw.patched_axisgrid():\n",
" facetplot = tp.tee(\n",
" performance_semantics_facetplot,\n",
" data=eval(data).map(\n",
" {\n",
" \"With lac-417\": \"Incl. lac-417\",\n",
" \"Sans lac-417\": \"Excl. lac-417\",\n",
" },\n",
" ),\n",
" data=rename_allocation(eval(data)),\n",
" x=\"Simstep Period Inlet (ns)\",\n",
" y=\"Latency Simsteps Inlet\",\n",
" hue=\"Allocation\",\n",
Expand Down

0 comments on commit 0a80dbc

Please sign in to comment.