Skip to content

Improve typing experience of users of the hvplot namespace #1486

Description

@maximlt

The .hvplot namespace is dynamically mounted on the data type of the imported source. For example, importing hvplot.pandas dynamically adds the hvplot property to pd.DataFrame. This dynamic approach makes it totally invisible to type checkers, typing df.hvplot in VS Code for instance gives no hint to the user. Given how important typing has become in Python, that's pretty bad! Note that the situation is much better when the code is executed in an IPython context.

I don't know if there's a way to fix that just using Python typing? If there's none, we should find and document a way for users to get a better typing experience using hvPlot. For example, this is already much better:

from hvplot import hvPlotTabular

plot = hvPlotTabular(data).line()
Image

Note: It's probably best to recommend importing and using hvPlot instead of hvPlotTabular.

Related to #893

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions