diff --git a/python-package/lightgbm/basic.py b/python-package/lightgbm/basic.py index caad9b24b0ea..7358c8205828 100644 --- a/python-package/lightgbm/basic.py +++ b/python-package/lightgbm/basic.py @@ -690,6 +690,8 @@ def _data_from_pandas( feature_name = list(data.columns) if categorical_feature == 'auto': # use cat cols from DataFrame categorical_feature = cat_cols_not_ordered + else: # use cat cols specified by user + categorical_feature = list(categorical_feature) if feature_name == 'auto': feature_name = list(data.columns) _check_for_bad_pandas_dtypes(data.dtypes)