Skip to content

Commit e6284c5

Browse files
authored
Merge branch 'main' into temporal-shenanigans
2 parents 2b76d3c + b6ce637 commit e6284c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

causal_testing/testing/estimators.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,9 @@ def estimate_ate(self) -> tuple[pd.Series, list[pd.Series, pd.Series]]:
384384
# Create an empty individual for the control and treated
385385
individuals = pd.DataFrame(1, index=["control", "treated"], columns=model.params.index)
386386

387+
# For Pandas version > 2, we need to explicitly state that the dataframe takes floating-point values
388+
individuals = individuals.astype(float)
389+
387390
# It is ABSOLUTELY CRITICAL that these go last, otherwise we can't index
388391
# the effect with "ate = t_test_results.effect[0]"
389392
individuals.loc["control", [self.treatment]] = self.control_value

0 commit comments

Comments
 (0)