-
Notifications
You must be signed in to change notification settings - Fork 128
Python Package: Problems with Codeline “effect.pdf(x)” #79
Copy link
Copy link
Open
Description
I recently installed the causality package. And, I am working through the example on the package's PyPi page: https://pypi.org/project/causality/
Everything seems to work well until I get to the last line with the code: effect.pdf(x)
I get the KeyError "KeyError: 'b'"
The offending block of code:
> from causality.estimation.nonparametric import CausalEffect
> admissable_set = adjustment.admissable_set(g,['x2'], ['x3'])
> effect = CausalEffect(X, ['x2'], ['x3'], variable_types=variable_types,
> admissable_set=list(admissable_set))
> x = pd.DataFrame({'x2' : [0.], 'x3' : [0.]})
> effect.pdf(x)
I think it's just a problem with the syntax of the code. I am new to Python and am not able to figure out what it is. Please help
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels