Why am i getting this error message?
Here are the variables that are included in my code. The columns they include are all dummy variables:
country_cols = wine_dummies.loc[:, 'country_Chile':'country_US']
variety_cols = wine_dummies.loc[:, 'variety_Cabernet
Sauvignon':'variety_Zinfandel']
pricecat_cols = wine_dummies.loc[:, 'price_category_low':]
Here is the code that is throwing the error (it is throwing the error at "X = wine[feature_cols_1]":
feature_cols_1 = ['price', country_cols, variety_cols, 'year']
feature_cols_2 = [pricecat_cols, country_cols, variety_cols, 'year']
X = wine[feature_cols_1] <---ERROR
y = wine['points']
Here is the head of my dataframe:
country designation points price province variety year ... variety_Riesling variety_Rosé variety_Sangiovese variety_Sauvignon Blanc variety_Syrah variety_Tempranillo variety_White Blend variety_Zinfandel price_category_low price_category_med
Portugal Avidagos 87 15.0 Douro Portuguese Red 2011.0 ... 0 0 0 0 0 0 0 0 1 0
^ each dummy variable (0s and 1s) after "..." corresponds to each column after "..."