Skip to content

Make decorators import optional? #64

@wleftwich

Description

@wleftwich

I recently discovered PhiK, and made it a standard step in my modeling process. Thank you!

One suggestion: When the decorators module is imported in __init__.py, it adds methods to pandas.DataFrame and Series. This happens even if one only explicitly imports a function from a phik submodule. It tends to make Python programmers queasy.

In my own copy of the package, I removed "from phik import decorators" from __init__.py. It's easy enough to import if I want to attach the methods to DataFrame. (I also renamed decorators to monkeypatch, and added a warning; but that's a matter of taste.)

Thanks again.

Metadata

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