Skip to content

patsy equivalent of R's all.vars #155

Open
@Xiaojieqiu

Description

Hey patsy developers, I wonder how can we retrieve the variable names from the model formula string (in R, this can be done via the all.vars function). For example,

if I have ("y ~ x1:x2 + np.log(x3) + I(x4^2)"), I want to return a list of ['x1', 'x2', 'x3', 'x4'].
Similarly, if I have ("~cr(time, df = 3)"), I want to return a list of ['time'].

Your help is highly appreciated!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions