I have a dataset. It contains , some random "-" values for the tail rows. Due to which , I'm not able to convert the datatypes of the columns. How can I delete such values of "-" using pandas ?
df2 = df2.drop(df2[df2["Inns"] == "-" or df2["NO"] == "-" or df2["Runs"] == "-" or df2["HS"] == "-" or df2["Ave"] == "-" or df2["BF"] == "-" or df2["SR"] == "-" or df2["100"] == "-" or df2["50"] == "-" or df2[0]=="-"].index)
df2
This is what I've used and below is the error I'm getting :
The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
Please help me remove it.