Skip to content

Reuse pandas components in other libraries #1

@datapythonista

Description

@datapythonista

In pandas 0.25 we are decoupling the pandas visualization from the core pandas. This will make it possible to plot in a native way using third-party libraries. For example:

import pandas
pandas.set_option('plotting.backend', 'hvplot')
pandas.Series([1, 2, 3]).plot()

But at the same time, this will allow libraries replicating the pandas API to reuse the Matplotlib backend deployed with pandas, as well as the third-party backends.

While pandas has historically been implemented as a "batteries include" dataframe library, splitting some parts like the visualization, can help other libraries replicating the pandas API reuse components and not have to implement everything from scratch.

Are there other components that would be useful decoupling from the pandas core? Some candidates:

  • Extension arrays: Already "independent", but probably still too coupled to pandas internals to be reused?
  • pandas.indexing
  • Accessors: Series.str, Series.dt,...
  • I/O components: See CLN: Implement io modules as plugins pandas-dev/pandas#26804
  • pandas.plotting: Not the backends (matplotlib, bokeh,...) but the code that creates the accessor and delegates the calls to the backend
  • ...

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