MCPcopy Create free account
hub / github.com/dask/dask / PandasBackendEntrypoint

Class PandasBackendEntrypoint

dask/dataframe/backends.py:807–824  ·  view source on GitHub ↗

Pandas-Backend Entrypoint Class for Dask-DataFrame Note that all DataFrame-creation functions are defined and registered 'in-place' within the ``dask.dataframe`` ``io`` module.

Source from the content-addressed store, hash-verified

805
806
807class PandasBackendEntrypoint(DataFrameBackendEntrypoint):
808 """Pandas-Backend Entrypoint Class for Dask-DataFrame
809
810 Note that all DataFrame-creation functions are defined
811 and registered 'in-place' within the ``dask.dataframe``
812 ``io`` module.
813 """
814
815 @classmethod
816 def to_backend_dispatch(cls):
817 return to_pandas_dispatch
818
819 @classmethod
820 def to_backend(cls, data, **kwargs):
821 if isinstance(data._meta, (pd.DataFrame, pd.Series, pd.Index)):
822 # Already a pandas-backed collection
823 return data
824 return data.map_partitions(cls.to_backend_dispatch(), **kwargs)
825
826
827dataframe_creation_dispatch.register_backend("pandas", PandasBackendEntrypoint())

Callers 1

backends.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected