Yes, this is not supported, you can use a property that is NaNnot equal to the one itself, which still works for types Decimal:
In [20]:
import pandas as pd
import decimal
d = decimal.Decimal('NaN')
df = pd.DataFrame({'a':[d]})
df
Out[20]:
a
0 NaN
In [21]:
df['a'].apply(lambda x: x != x)
Out[21]:
0 True
Name: a, dtype: bool
So you can do:
In [26]:
df = pd.DataFrame({'a':[d,1,2,3]})
df[df['a'].apply(lambda x: x == x)]
Out[26]:
a
1 1
2 2
3 3
source
share