Stepping into RFE and getting 'DataFrame object is not callable" error
<p>I'm trying to use RFE for the first time and banging my head against a "DataFrame object is not callable" error.</p>

<p>Here is my code</p>

<pre><code>X, y = df5(n_samples=875, n_features=10, random_state=0)
estimator = SVR(kernel="linear")
selector = RFE(LinearRegression, step=1, cv=5)
selector = selector.fit(X, y)
df5([ True,  True,  True,  True,  True,
        False, False, False, False, False], dtype=bool)

selector.ranking_
df5([1, 1, 1, 1, 1, 6, 4, 3, 2, 5])
</code></pre>

<p>I'm looking at a dataset with 49 Features and the output I'm looking for is which of these features should be kept and which kicked out.</p>

<p>Bonus points if anyone can help me figure out how to get this into an RFECV!</p>

<p>If you want select columns first figure out the information about your dataframe then select required features.</p>

<pre><code># the next 2 lines is to initialize DataFrame object (just for the example)
&gt;&gt;&gt; from pandas import DataFrame
&gt;&gt;&gt; df = DataFrame.from_dict({'one': range(10), 'two': range(10, 0, -1), 'three': [3 for x in range(10)]})

# now figure out what columns you df has:
&gt;&gt;&gt; df.head()
   one  three  two
0    0      3   10
1    1      3    9
2    2      3    8
3    3      3    7
4    4      3    6
5    5      3    5
6    6      3    4
7    7      3    3
8    8      3    2
9    9      3    1

# Now you can slice specific columns (features in your case):
&gt;&gt;&gt; df[['one', 'two']]
   one  two
0    0   10
1    1    9
2    2    8
3    3    7
4    4    6
5    5    5
6    6    4
7    7    3
8    8    2
9    9    1
</code></pre>

<p>Are your feature names numerical? I'm not sure. Check it.</p>

python scikit-learn rfe