Modin Utils#

Here are utilities that can be useful when working with Modin.

Public API#

modin.utils.try_cast_to_pandas(obj: Any, squeeze: bool = False) Any#

Convert obj and all nested objects from Modin to pandas if it is possible.

If no convertion possible return obj.

Parameters:
  • obj (object) – Object to convert from Modin to pandas.

  • squeeze (bool, default: False) – Squeeze the converted object(s) before returning them.

Returns:

Converted object.

Return type:

object

modin.utils.execute(*objs: Iterable[Any], trigger_hdk_import: bool = False) None#

Trigger the lazy computations for each obj in objs, if any, and wait for them to complete.

Parameters:
  • *objs (Iterable[Any]) – A collection of objects to trigger lazy computations.

  • trigger_hdk_import (bool, default: False) – Trigger import execution. Makes sense only for HDK storage format. Safe to use with other storage formats.