Fix for the case when cat_features is None
@@ -585,6 +585,7 @@ class Pool(_PoolBase):
"""
if isinstance(data, DataFrame):
feature_names = list(data.columns)
+ if cat_features is not None:
cat_features = [
data.columns.get_loc(cf) if isinstance(cf, STRING_TYPES) else cf
for cf in cat_features
