Questions tagged [nan]
NaN (Not a Number) represents an undefined value. Under the IEEE standard, NaN is not equal to itself.
4,349
questions
3
votes
2
answers
62
views
How do I get variable length slices of values using Pandas?
I have data that includes a full name and first name, and I need to make a new column with the last name. I can assume full - first = last.
I've been trying to use slice with an index the length of ...
0
votes
1
answer
32
views
Pandas apply is turning matrices into nan/None
I am running the following code on a dataset trying to tally the rows from one data set that match a varied set of criteria. I am using the apply function to store this tally inside of a matrix, where ...
0
votes
0
answers
15
views
Need help on solving numerical stability issue on hand craft NN use numpy
I try to craft an NN from scratch using Numpy.
When I try to run it, the loss goes to the nan value after a few epochs, also the loss increases instead of decreasing. Am I doing something wrong and ...
-1
votes
0
answers
28
views
Trying to calculate a value but getting NaN all the time (App Script > Google sheets)
I'm getting the values from a Google Sheet, inserting values into a template file in Google Docs in order to generate a number of Invoices (in Pdf).
My guess is that from Google Sheet I'm getting a ...
1
vote
0
answers
32
views
scikit-learn: ValueError: Input contains NaN, infinity or a value too large for dtype('float64') while predicting with GP
I've been using scikit-learn for Gaussian process regressors for a while, working with adaptively constructed models where the existing GP is used to select new datapoints for the GP. Recently I've ...
-3
votes
1
answer
61
views
remove nan from column of lists
I have a dataframe with a column of empty value and list with values which includes 'nan'. I need to remove the nan and create another column with total count of values within list in each cell.
data =...
0
votes
0
answers
30
views
NaN values on my bar chart x axis, removing with .notna() is creating empty space along axis
I am trying to create a bar chart representing positive and negative percentage values. I don't have any empty values in my CSV file:
When I write the following code I get an output with several nan ...
0
votes
0
answers
36
views
Pandas:using list as cell value - different approach to modify values and NaN issues
This is 50% a question and 50% an observation that baffles me a bit. Maybe someone can enlighten me.
Also I would like to know opinions on using lists as cell values. Yes/No and why please.
Here is a ...
0
votes
0
answers
7
views
How to fix the 'nan' value in f statistic of fixed effects regression model
I am running regression analysis on Python and want to figure out which model explains the variance in the dependent variable better, the pooled OLS or fixed effects model (because my independent ...
1
vote
0
answers
21
views
Loss is Nan with Tensorflow
I've developed a TensorFlow model for an artificial intelligence project, but I'm having a problem with NaN in the loss function during training. Here's an extract from my code:
import os
os.environ['...
2
votes
2
answers
41
views
pandas groupby expanding mean does not accept missing values
I've been looking to retrieve group-based expanding means from the following dataset:
df = pd.DataFrame({'id':[1,1,1,2,2,2],'y':[1,2,3,1,2,3]})
and df.groupby('id').expanding().mean().values returns ...
0
votes
0
answers
37
views
Why are x, y in a twin d3v7 force graph NaN? Why doesn't the data work properly?
I want to implement a dual-panel set of D3 force graphs (see below).
I use an adjacency list to split my original data into two graphs. There are two copies of everything, so individual elements can ...
1
vote
2
answers
50
views
Replace all nan in a 2D array by the nanmean() value of adjacent neighboring cells
I have a 2D array witch include some nan and I would like do the following :
replace each nan in the array by the nanmean() value of adjacent neighboring cells.
if the neighboring cells are all nan, ...
0
votes
1
answer
56
views
Python_Pandas regex with vectorization is generating NaN
I have a data set which has columns that looks like this:
The Loc_Description column contains the name of towns and roads. The position of a town name with each string varies and is mostly dependent ...
1
vote
1
answer
42
views
Transfering NaN's to Dummy Variables While Using One Hot Encoder
I am using OneHotEncoder to create a series of dummy variables based on a categoric variable. The problem I encounter is that any missing values are not transfered to the available dummy variables.
...