Skip to content

Commit

Permalink
fix interactive tables
Browse files Browse the repository at this point in the history
  • Loading branch information
paulzierep committed Mar 5, 2024
1 parent d7c52f9 commit 99aad1f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/create_interactive_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ def generate_table(
template_path: str,
output_path: str,
) -> None:
df = pd.read_csv(tsv_path, sep="\t").assign(Expand=lambda df: "").fillna("")
df = pd.read_csv(tsv_path, sep="\t")
df.insert(0, "Expand", None) # the column where the expand button is shown
df = df.fillna("")

if "To keep" in df.columns:
df["To keep"] = df["To keep"].replace("", True)
df = df.query("`To keep`")

df.insert(0, "Expand", None) # the column where the expand button is shown
df = df.drop(COLUMNS_TO_DROP, axis=1)

# df = df.loc[:, COLUMNS].reindex(columns=COLUMNS)
Expand Down

0 comments on commit 99aad1f

Please sign in to comment.