I have a dataframe and want to drop the non numerical rows in the column Score
import pandas as pd
df=pd.DataFrame({
'Score': [4.0,6,'3 1/3',7,'43a'],
'Foo': ['Nis','and stimpy','d','cab','abba'],
'Faggio':[0,1,0,1,0]
})
The result I want should look like:
Faggio Foo Score
0 0 Nis 4
1 1 and stimpy 6
3 1 cab 7
I have tried:
ds=df[df['Score'].apply(lambda x: str(x).isnumeric())]
print(ds)
ds2=df[df['Score'].apply(lambda x: str(x).isdigit())]
print(ds2)
But both of them erased the column with the float.