Skip to content

Instantly share code, notes, and snippets.

@tchiavegatti
Created June 7, 2021 15:51
Show Gist options
  • Save tchiavegatti/8923279bbcf0bb6aaf5fddd44f35402b to your computer and use it in GitHub Desktop.
Save tchiavegatti/8923279bbcf0bb6aaf5fddd44f35402b to your computer and use it in GitHub Desktop.
[dtype conversion error] Find and locate invalid values #pandas #python
import pandas as pd
df = pd.read_csv('data/data_8.csv')
is_error = pd.to_numeric(df['Grade'], errors='coerce').isna()
df[is_error]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment