Top "Nan" questions

NaN is an abbreviation for "Not a Number". NaN is sometimes not equal to itself.

In Java, what does NaN mean?

I have a program that tries to shrink a double down to a desired number. The output I get is …

java nan
How to turn NaN from parseInt into 0 for an empty string?

Is it possible somehow to return 0 instead of NaN when parsing values in JavaScript? In case of the empty string …

javascript nan
convert nan value to zero

I have a 2D numpy array. Some of the values in this array are NaN. I want to perform certain …

python numpy nan
How to set a cell to NaN in a pandas dataframe

I'd like to replace bad values in a column of a dataframe by NaN's. mydata = {'x' : [10, 50, 18, 32, 47, 20], 'y' : ['12', '11…

python pandas nan
How do you test to see if a double is equal to NaN?

I have a double in Java and I want to check if it is NaN. What is the best way …

java double equality nan
How to find which columns contain any NaN value in Pandas dataframe

Given a pandas dataframe containing possible NaN values scattered here and there: Question: How do I determine which columns contain …

python pandas dataframe nan
Replace invalid values with None in Pandas DataFrame

Is there any method to replace values with None in Pandas in Python? You can use df.replace('pre', 'post') …

python pandas dataframe replace nan
Assigning a variable NaN in python without numpy

Most languages have a NaN constant you can use to assign a variable the value NaN. Can python do this …

python constants nan
pandas GroupBy columns with NaN (missing) values

I have a DataFrame with many missing values in columns which I wish to groupby: import pandas as pd import …

python pandas group-by pandas-groupby nan
Fast check for NaN in NumPy

I'm looking for the fastest way to check for the occurrence of NaN (np.nan) in a NumPy array X. …

python performance numpy nan