id_translation.dio.integration.dask#
Integration for Dask types.
Module Attributes
Supported |
Classes
|
IO implementation for |
- class DaskIO[source]#
Bases:
DataStructureIO[DaskT,str,SourceType,IdType]IO implementation for
dasktypes.- classmethod extract(translatable, names)[source]#
Extract IDs from translatable.
- Parameters:
translatable – Data to extract IDs from.
names – List of names in translatable to extract IDs for.
- Returns:
A dict
{name: ids}.
- classmethod handles_type(arg)[source]#
Return
Trueif the implementation handles data for the type of arg.
- classmethod insert(translatable, names, tmap, copy)[source]#
Insert translations into translatable.
- Parameters:
translatable – Data to translate. Modified iff
copy=False.names – Names in translatable to translate.
tmap – Translations for IDs in translatable.
copy – If
True, modify contents of the original translatable. Otherwise, returns a copy.
- Returns:
A copy of translatable if
copy=True,Noneotherwise.- Raises:
NotInplaceTranslatableError – If
copy=Falsefor a type which is not translatable in-place.
- class DaskT#
Supported
dasktypes.alias of TypeVar(‘DaskT’, ~dask.dataframe.dask_expr._collection.DataFrame, ~dask.dataframe.dask_expr._collection.Series)