Skip to content

Commit

Permalink
doc examples patched
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Roussel authored and Julien Roussel committed Apr 17, 2024
1 parent 5559c85 commit 4e5a380
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/tutorials/plot_tuto_categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# ---------------------------------------------------------------
# We get the data and focus on the explanatory variables
df = data.get_data("Titanic")
df = df.drop(columns=["survived"])
df = df.drop(columns=["Survived"])

# %%
# 2. Mixed type imputation methods
Expand Down
2 changes: 1 addition & 1 deletion qolmat/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def add_holes(df: pd.DataFrame, ratio_masked: float, mean_size: int) -> pd.DataF
pd.DataFrame
dataframe with missing values
"""
groups = df.index.names.difference(["datetime", "date", "index"])
groups = df.index.names.difference(["datetime", "date", "index", None])
if groups != []:
generator = missing_patterns.GeometricHoleGenerator(
1, ratio_masked=ratio_masked, subset=df.columns, groups=groups
Expand Down

0 comments on commit 4e5a380

Please sign in to comment.