to_numeric

pd.to_numeric() converts a column to numbers. With errors='coerce', non-convertible values become NaN instead of raising an error, which lets you spot them afterward. Decimal separators or currency symbols must be cleaned before conversion.

Example

df['prix'] = pd.to_numeric(df['prix'], errors='coerce')

Related concepts

The whole glossary