diff --git a/python/dask_cudf/dask_cudf/backends.py b/python/dask_cudf/dask_cudf/backends.py index 30a34e9b479..344b03c631d 100644 --- a/python/dask_cudf/dask_cudf/backends.py +++ b/python/dask_cudf/dask_cudf/backends.py @@ -397,7 +397,11 @@ def _cudf_to_table(obj, preserve_index=None, **kwargs): # (see: https://github.com/rapidsai/cudf/issues/14159) if preserve_index and isinstance(obj.index, cudf.RangeIndex): obj = obj.copy() - obj.index.name = obj.index.name if obj.index.name is not None else "__index_level_0__" + obj.index.name = ( + obj.index.name + if obj.index.name is not None + else "__index_level_0__" + ) obj.index = obj.index._as_int_index() return obj.to_arrow(preserve_index=preserve_index)