Getting a Python error with gscatter: How to troubleshoot and fix it?

20 Replies, 1877 Views

Ugh, the Python error gscatter thing is so annoying! I had this happen when my data had mixed types, like some floats and some strings.

Make sure your x and y are both numeric. You can use `.astype(float)` to force the conversion. Also, if you’re using pandas, try `.to_numpy()` instead of `.values`. It’s more reliable these days.

Messages In This Thread



Users browsing this thread: 1 Guest(s)