更新时间:2023-12-02 13:51:46
model.params
是pandas.Series.仅当条目名称是有效的python名称时,才可以作为属性访问.
model.params
is is a pandas.Series. Accessing as attribute is only possible if the name of the entry is a valid python name.
在这种情况下,您需要用引号将该名称索引,即model.params["C[T.foo]"]
In this case you need to index with the name in quotes, i.e. model.params["C[T.foo]"]