Python is reading my data with NANS and Infs, but they don't have any

I'm having an issue in Python where it says that the dataframe I have loaded through pandas.read_csv() cannot be scaled using StandardScaler()because of the presence of Inf values or values too big for dtype(float) I checked in R (I am more comfortable with this language, but have to use Python for this project) and it shows that the dataframe does not have any Inf values or NAs.

Are there restrictions in Python that converts large numbers or small numbers to NA/NaN/Inf?

Thanks.

Topic data feature-scaling dataset data-cleaning machine-learning

Category Data Science


You should use pandas.DataFrame.describe() to find the values that are present in the feature and see which specific values might be an issue.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.