File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -337,14 +337,14 @@ def _get_columns_info(
337
337
# Make sure each column is a valid type
338
338
for i , column in enumerate (X .columns ):
339
339
column_dtype = self .dtypes [i ]
340
- if column_dtype . name in ['category' , 'bool' ]:
340
+ if column_dtype in ['category' , 'bool' ]:
341
341
categorical_columns .append (column )
342
342
feat_type .append ('categorical' )
343
343
# Move away from np.issubdtype as it causes
344
344
# TypeError: data type not understood in certain pandas types
345
345
elif not is_numeric_dtype (column_dtype ):
346
346
# TODO verify how would this happen when we always convert the object dtypes to category
347
- if column_dtype . name == 'object' :
347
+ if column_dtype == 'object' :
348
348
raise ValueError (
349
349
"Input Column {} has invalid type object. "
350
350
"Cast it to a valid dtype before using it in AutoPyTorch. "
@@ -376,7 +376,7 @@ def _get_columns_info(
376
376
"Make sure your data is formatted in a correct way, "
377
377
"before feeding it to AutoPyTorch." .format (
378
378
column ,
379
- column_dtype . name ,
379
+ column_dtype ,
380
380
)
381
381
)
382
382
else :
You can’t perform that action at this time.
0 commit comments