From 4babcccb5be7ae4bd4bc70f3cc0acaa68106baaf Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:38:22 -0800 Subject: [PATCH] fix variable --- python/cudf/cudf/_lib/csv.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cudf/cudf/_lib/csv.pyx b/python/cudf/cudf/_lib/csv.pyx index 0df27cab5c6..bd9fb9408ae 100644 --- a/python/cudf/cudf/_lib/csv.pyx +++ b/python/cudf/cudf/_lib/csv.pyx @@ -442,11 +442,11 @@ def read_csv( np.dtype, pd.api.extensions.ExtensionDtype, type )) ): - if isinstance(cudf.dtype(v), cudf.CategoricalDtype): + if isinstance(cudf.dtype(dtype), cudf.CategoricalDtype): df = df.astype(dtype) elif isinstance(dtype, abc.Collection): for index, col_dtype in enumerate(dtype): - if isinstance(cudf.dtype(v), cudf.CategoricalDtype): + if isinstance(cudf.dtype(col_dtype), cudf.CategoricalDtype): col_name = df._data.names[index] df._data[col_name] = df._data[col_name].astype(col_dtype)