J Conrado wrote:
> I have a 2d array and I would how can I replace NaN values for example
> with - value or other value.
>>> a
array([[ nan, 1., 2., 3.],
[ 4., 5., 6., 7.],
[ 8., 9., 10., nan]])
>>> a[numpy.isnan(a)] = 42
>>>
Hi,
I have a 2d array and I would how can I replace NaN values for example
with - value or other value.
Thank,
Conrado
--
https://mail.python.org/mailman/listinfo/python-list
Hi i am trying to use chi-square Test to select most important columns among
5501 columns. But for most of the columns i am getting NAN value as a Chi test
value
import pandas as pd
from sklearn.preprocessing import LabelEncoder
from sklearn.feature_selection import chi2
cols =[]
cols.append(int