Skip to content

Commit

Permalink
Use replace with categorical columns properly
Browse files Browse the repository at this point in the history
  • Loading branch information
timmens committed Mar 4, 2024
1 parent 3c072c3 commit 7af5cb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/inference/test_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def expected():
def seaborn_example():
out = {}

df = sns.load_dataset("exercise", index_col=0)
raw = sns.load_dataset("exercise", index_col=0)
replacements = {"1 min": 1, "15 min": 15, "30 min": 30}
df = df.replace({"time": replacements})
df = raw.assign(time=raw.time.cat.rename_categories(replacements).astype(int))
df["constant"] = 1

lower_ci = pd.Series([90.709236, 0.151193], index=["constant", "time"])
Expand Down

0 comments on commit 7af5cb6

Please sign in to comment.