1
$\begingroup$

I have some NaN values in my data and I cannot replace it with median or something else.

Now I have to check out the correlation, using scatter plot and Pearson correlation.

Should I drop these NaNs or there is no difference? Actually, I see the difference, but a very, very small difference. What is the best solution here?

$\endgroup$
1
  • 2
    $\begingroup$ Is the very, very small difference important? It might depend on how the specific pearson correlation function you're using deals with NaNs $\endgroup$
    – WBM
    Mar 14, 2021 at 18:11

1 Answer 1

1
$\begingroup$

Yes - drop NaNs. Even if the Pearson correlation implementation you are using can return a number, what does that number mean? How could you interpret that number?

$\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.