
<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
Using Sklearn RFE to Select Features

<ASSISTANT_TASK:>
Python Code::
from sklearn.ensemble import RandomForestRegressor
from sklearn.feature_selection import RFE
rf = RandomForestRegressor(random_state=101)
rfe = RFE(rf, n_features_to_select=8)
rfe = rfe.fit(X_train, y_train)
predictions = rfe.predict(X_test)
#Print feature rankings
feature_rankings = pd.DataFrame({'feature_names':np.array(X_train.columns),'feature_ranking':rfe.ranking_})
print(feature_rankings)

<END_TASK>
