Skip to content
Advertisement

Percentile Python, problems Setting values

Im calculating percentiles and doing some operations along too many columns.

JavaScript

I need to get the unique values then, setting my vector i got this:

JavaScript

It works in almost all of the columns, but for any reason i got columns with this issue:

JavaScript

then calculating percentiles:

JavaScript

then, setting this vector i got this:

JavaScript

Setting doesnt work.

How can i solve this?

Advertisement

Answer

Since nan values, which are float, are not equal even to themselves, you can use code below:

JavaScript

Output

JavaScript
Advertisement