1.1.9. patsy.dmatrices¶
-
patsy.
dmatrices
(formula_like, data={}, eval_env=0, NA_action='drop', return_type='matrix')[source]¶ Construct two design matrices given a formula_like and data.
This function is identical to
dmatrix()
, except that it requires (and returns) two matrices instead of one. By convention, the first matrix is the “outcome” or “y” data, and the second is the “predictor” or “x” data.See
dmatrix()
for details.