Respect original names of call terms
tomicapretto opened this issue · comments
Tomás Capretto commented
import pandas as pd
from formulae import design_matrices
df = pd.DataFrame({"x": [0, 1, 2, 3]})
def f(x, a="test"):
return x
design_matrices("f(x, a='not-test')", df).common
CommonEffectsMatrix with shape (4, 2)
Terms:
Intercept
kind: intercept
column: 0
f(x, a = not-test)
kind: numeric
column: 1
To access the actual design matrix do 'np.array(this_obj)'
The term was originally written as "f(x, a='not-test')"
but it shows "f(x, a = not-test) "
.
- Adds space around the
=
symbol - Removes quotes from the string argument