Open
Description
It looks like Standardize(x) comes before drop_na --> therefore the standardization returns all nan
import numpy as np
import pandas as pd
from patsy import dmatrix
df = pd.DataFrame({'x1': np.arange(5), 'x2': [1,2,np.nan,5,6]})
output:
dmatrix("~x1+x2", df)
[[1. 0. 1.]
[1. 1. 2.]
[1. 3. 5.]
[1. 4. 6.]]
dmatrix("~x1+standardize(x2)", df)
DesignMatrix with shape (0, 3)
Intercept x1 standardize(x2)
Terms:
'Intercept' (column 0)
'x1' (column 1)
'standardize(x2)' (column 2)
Metadata
Assignees
Labels
No labels