Skip to content

Commit

Permalink
fix variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Jan 31, 2024
1 parent 7269e4e commit 4babccc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/cudf/cudf/_lib/csv.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 4babccc

Please sign in to comment.