Patsy Formula When Variable Has A Hypthen
I am trying to use the statsmodel linear regression functions with formulas. My sample data is coming from a Pandas data frame. I am having a slight problem with column names withi
Solution 1:
patsy uses Q
for quoting names, e.g. Q('B-IDW')
http://patsy.readthedocs.io/en/latest/builtins-reference.html#patsy.builtins.Q
my_fit_function("y ~ Q('weight.in.kg')", ...)
Post a Comment for "Patsy Formula When Variable Has A Hypthen"