Say I import a csv into pandas, and I realize there are some non-numeric values in a column that I expect to be all numeric.
This is how I would find those values (in a dataframe called df in a column called should_be_numbers):
df[pd.to_numeric(df['should_be_numbers'], errors='coerce').isnull()]['should_be_numbers']
My question: Is there a cleaner/more pythonic/less clunky way to do this?
pd.read_csvhas adtypearg where you can specify the data type of the column. I'm assuming you have a column being stored as a string and you're getting scientific notation values