We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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+x2", df)
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)
dmatrix("~x1+standardize(x2)", df)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It looks like Standardize(x) comes before drop_na --> therefore the standardization returns all nan
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)
The text was updated successfully, but these errors were encountered: