title: How to handle seaborn pairplot errors when the dataset has NaN values?
body: <p>I have a pandas DataFrame with multiple columns filled with numbers and rows, and the 1st column has the categorical data. Obviously, I have NaN values and zeroes in multiple rows (but not the entire blank row, of course) and in different columns.</p>
  <p>The rows have valuable data in other columns which are not NaN. And the columns have valuable data in other rows, which are also not NaN.</p>
  <p>The problem is that <code>sns.pairplot</code> does not ignore NaN values for correlation and returns errors (such as division by zero, string to float conversion, etc.).</p>
  <p>I have seen some people saying to use <code>fillna()</code> method, but I am hoping if anyone knows a more elegant way to do this, without having to go through that solution and spend numerous hours to fix the plot, axis, filters, etc. afterwards. I didn't like that work around.</p>
  <p>It is similar to what this person has reported:<br />
  <a href="https://github.com/mwaskom/seaborn/issues/1699" rel="nofollow noreferrer">https://github.com/mwaskom/seaborn/issues/1699</a></p>
  <blockquote>
  <p>ZeroDivisionError: 0.0 cannot be raised to a negative power</p>
  </blockquote>
  <p>Here is the sample dataset:
  <a href="https://i.stack.imgur.com/hD0c4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hD0c4.png" alt="image of the sample dataset" /></a></p>