Given a Series like
Series
import pandas as pd s = pd.Series([\'foo\', \'bar\', 42])
I would like to obtain a \'sub-series\' p
p
I'd use pd.to_numeric as pointed above.
pd.to_numeric
Alternatively, you can use str.isalpha
str.isalpha
In [109]: s[s.str.isalpha().notnull()] Out[109]: 0 foo 1 bar dtype: object