2
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ There is, could you provide code so we can reproduce your errors and investigate where it comes from ? $\endgroup$ Jul 23, 2019 at 10:49

1 Answer 1

0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.