Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongyoonlee committed Oct 13, 2024
1 parent 3934fab commit 99fc59e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions causalml/metrics/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ def get_cumlift(
assert (
(outcome_col in df.columns and df[outcome_col].notnull().all())
and (treatment_col in df.columns and df[treatment_col].notnull().all())
or (treatment_effect_col in df.columns and df[treatment_effect_col].notnull().all())
or (
treatment_effect_col in df.columns
and df[treatment_effect_col].notnull().all()
)
), "{outcome_col} and {treatment_col}, or {treatment_effect_col} should be present without null.".format(
outcome_col=outcome_col,
treatment_col=treatment_col,
Expand Down Expand Up @@ -266,7 +269,10 @@ def get_qini(
assert (
(outcome_col in df.columns and df[outcome_col].notnull().all())
and (treatment_col in df.columns and df[treatment_col].notnull().all())
or (treatment_effect_col in df.columns and df[treatment_effect_col].notnull().all())
or (
treatment_effect_col in df.columns
and df[treatment_effect_col].notnull().all()
)
), "{outcome_col} and {treatment_col}, or {treatment_effect_col} should be present without null.".format(
outcome_col=outcome_col,
treatment_col=treatment_col,
Expand Down

0 comments on commit 99fc59e

Please sign in to comment.