serhii.net

In the middle of the desert you can say anything you want

27 Apr 2023

pandas drop non-numeric rows

[Code]-Drop Rows with Non-Numeric Entries in a Column (Python)-pandas shows one way to do this using pd.to_numeric()1:

df['Gm#'] = pd.to_numeric(df['Gm#'], errors='coerce')
df = df.dropna(subset=['Gm#'])
Nel mezzo del deserto posso dire tutto quello che voglio.