modin.pandas.DataFrame.set_backend¶
- DataFrame.set_backend(backend: str, inplace: bool = False, *, switch_operation: Optional[str] = None) Optional[Self][source]¶
Move the data in this
DataFramefrom its current backend to the given one.Further operations on this
DataFramewill 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
DataFramein 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
inplaceis False, returns a new instance of theDataFramewith the given backend. IfinplaceisTrue, returns None.- Return type:
DataFrameor None
Notes
This method will attempt to use the starting and new backend’s move_from or move_to methods if the backends implement them. Otherwise, it will
convert the data in this
DataFrameto a pandas DataFrame in this Python processload 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.