find numeric column names in Pandas
Try
df.ids = df.ids.astype('object')
new_df = df.select_dtypes([np.number])
0 1 2 3 4
0 17.0 18.0 16.0 15.0 15.0
1 18.0 16.0 15.0 15.0 16.0
2 16.0 15.0 15.0 16.0 15.0
3 15.0 15.0 16.0 15.0 17.0
4 15.0 16.0 15.0 17.0 NaN
EDIT: If you are interested in selecting column names that are numeric, here is something that you can do.
df = pd.DataFrame({0: [1,2], '1': [3,4], 'blah': [5,6], 2: [7,8]})
df.columns = pd.to_numeric(df.columns, errors = 'coerce')
df[df.columns.dropna()]
You get
0.0 1.0 2.0
0 1 3 7
1 2 4 8