modin.pandas.DataFrame.set_backend

DataFrame.set_backend(backend: str, inplace: bool = False, *, switch_operation: Optional[str] = None) Optional[Self][source] (https://github.com/snowflakedb/snowpark-python/blob/v1.33.0/.tox/docs/lib/python3.9/site-packages/modin/pandas/dataframe.py#L3357-L3367)

Move the data in this DataFrame from its current backend to the given one.

Further operations on this DataFrame will use the new backend instead of the current one.

Parameters:
  • backend (str) – The name of the backend to set.

  • inplace (bool, default: False) – Whether to modify this DataFrame in place.

  • switch_operation (Optional[str], default: None) – The name of the operation that triggered the set_backend call. Internal argument used for displaying progress bar information.

Returns:

If inplace is False, returns a new instance of the DataFrame with the given backend. If inplace is True, returns None.

Return type:

DataFrame or None

Notes

This method will
  1. convert the data in this DataFrame to a pandas DataFrame in this Python process

  2. load the data from pandas to the new backend.

Either step may be slow and/or memory-intensive, especially if this DataFrame’s data is large, or one or both of the backends do not store their data locally.

Language: English