missing-data Questions

4

I was working with discord.js last night and I ran a few commands in the terminal. The last command I wrote caused the name of the file at the top of the screen to be crossed out and turn red and I...
Palocz asked 23/1, 2022 at 10:5

15

Solved

Here's a little piece of code I wrote to report variables with missing values from a data frame. I'm trying to think of a more elegant way to do this, one that perhaps returns a data.frame, but I'm...
Imine asked 29/11, 2011 at 20:23

6

Solved

Is there any way to check for missing dates in a dataframe directly. I want to check if there are a missing dates between 2013-01-19 to 2018-01-29 GWA_BTC GWA_ETH GWA_LTC GWA_XLM GWA_XRP Date 2...
Phrase asked 27/8, 2018 at 17:34

6

Solved

This question is motivated by an answer I gave a while ago. Let's say I have a dataframe like this import numpy as np import pandas as pd df = pd.DataFrame({'a': [1, 2, np.nan], 'b': [3, np.nan,...
Sibley asked 13/12, 2017 at 8:16

4

Consider data which contains some nan below: Column-1 Column-2 Column-3 Column-4 Column-5 0 NaN 15.0 63.0 8.0 40.0 1 60.0 51.0 NaN 54.0 31.0 2 15.0 17.0 55.0 80.0 NaN 3 54.0 43.0 70.0 16.0 73.0 4...
Hyperkinesia asked 22/7, 2019 at 21:52

2

Just wanna load a .jar file but I can't, and when running java --version I get: openjdk 17.0.4 2022-07-19, OpenJDK Runtime Environment (build 17.0.4+8-Debian-1), and OpenJDK 64-Bit Server VM (build...
Atrophy asked 9/9, 2022 at 18:38

2

Solved

I am working on a Time Series Forecasting problem using LSTM. The input contains several features, so I am using a Multivariate LSTM. The problem is that there are some missing values, for example...
Tintinnabulation asked 29/9, 2018 at 16:13

11

Solved

In R I can quickly see a count of missing data using the summary command, but the equivalent pandas DataFrame method, describe does not report these values. I gather I can do something like len(m...
Applaud asked 7/3, 2014 at 18:8

1

I am handling missing data using imputation. I am exploring the Amelia and rms packages for imputation. I have some queries regarding these packages. I want to combine the imputed data sets from...
Norsworthy asked 27/9, 2014 at 17:58

6

After ADD TO CART option i can see the items are getting updated to CART but when moving to cart page it is redirecting back to homepage. The cart page shortcode is also provided. Please help...
Accusative asked 22/6, 2017 at 4:39

9

I have a pandas data frame where there are a several missing values. I noticed that the non missing values are close to each other. Thus, I would like to impute the missing values by randomly choos...
Candlestick asked 4/4, 2016 at 21:34

1

I have been having some issues with my VScode. I am unable to open it and instead, I see a message that the code.exe file has been moved or deleted. I have tried reinstalling VScode from the offici...

6

Solved

I want to save X (ndarray) with dimensions (3960, 225) in excel file (.xlsx). In X I have some missing values (nan). I made a code for it. However, I am getting the error. Here is the Code: workboo...
Lunseth asked 13/12, 2020 at 17:26

20

Solved

I'd like to remove the lines in this data frame that: a) contain NAs across all columns. Below is my example data frame. gene hsap mmul mmus rnor cfam 1 ENSG00000208234 0 NA NA NA NA 2 ENSG0000...
Antaeus asked 1/2, 2011 at 11:52

2

I want to fill in the missing values of two columns with the mean method. I type of the two columns is float64. df['col1'].dtypes dtype('float64') df['col2'].dtypes dtype('float64') I used two met...
Filings asked 17/7, 2023 at 15:30

8

Solved

I have a data frame with two columns "a" and "b" with alternating missing values (NA) a b dog <NA> mouse <NA> <NA> cat bird <NA> I want to "merge" / combine them to a ne...
Fonz asked 8/1, 2015 at 22:2

4

How can I execute Little's Test, to find MCAR in Python? I have looked at the R package for the same test, but I want to do it in Python. Is there an alternate approach to test MCAR?

2

I have a dissimilarity matrix on which I would like to perform multidimensional scaling (MDS) using the sklearn.manifold.MDS function. The dissimilarity between some elements in this matrix is not ...

7

Solved

I have a complete dataframe. I want to 20% of the values in the dataframe to be replaced by NAs to simulate random missing data. A <- c(1:10) B <- c(11:20) C <- c(21:30) df<- data.fra...
Cricoid asked 13/12, 2014 at 0:36

3

Solved

I am trying to import a csv into a pandas dataframe. I have boolean variables denoted with 1's and 0's, where missing values are identified with a -9. When I try to specify the dtype as boolean, I...
Gavriella asked 23/12, 2016 at 15:49

6

Solved

I have a question similar to this one, but my dataset is a bit bigger: 50 columns with 1 column as UID and other columns carrying either TRUE or NA, I want to change all the NA to FALSE, but I don'...
Extensile asked 2/9, 2011 at 3:59

2

Solved

The following code raises a KeyError exception: addr_list_formatted = [] addr_list_idx = 0 for addr in addr_list: # addr_list is a list addr_list_idx = addr_list_idx + 1 addr_list_formatted.app...
Sleepyhead asked 2/5, 2010 at 22:6

7

Solved

I am trying to convert a csv into numpy array. In the numpy array, I am replacing few elements with NaN. Then, I wanted to find the indices of the NaN elements in the numpy array. The code is : im...
Carriecarrier asked 5/10, 2018 at 1:45

2

Solved

I am trying to use KNN for imputing categorical variables in python. In order to do so, a typical way is to one hot encode the variables before. However sklearn OneHotEncoder() doesn't handle NAs s...
Stanfield asked 10/3, 2021 at 11:25

2

Solved

I'm trying to fill in missing values after groupby two columns on the planets dataset. # Load data df = sns.load_dataset('planets') # Check naan df.isna().sum() method 0 number 0 orbital_period 4...
Boling asked 22/8, 2022 at 19:2

© 2022 - 2025 — McMap. All rights reserved.