Skip to main content
3 votes
3 answers
179 views

I have a long format table which already has NAs: df <- data.frame( ID = c(1, 1, 2, 2, 3), region = c("A", "B", "A", "B", "A"), status = c(1, ...
Caterina's user avatar
  • 1,159
-1 votes
1 answer
207 views

I have a problem where I have two arrays that can possibly have different shapes that I want to multiply together. Let's say I have two cases (I'm just using zeros right now cause all I care about is ...
Jehan Dastoor's user avatar
2 votes
2 answers
100 views

I have a MultiIndex table as follows Index0 Index1 Variable A 0 "a" A 1 "x" A 2 "t" B 0 "x" B 1 ...
The Stackoverflow User's user avatar
1 vote
2 answers
132 views

I need to reshape the mnist data to include a "1" for grayscale and the code below does this I believe. The original mnist data is in this shape: (60000, 28, 28). What is the significance of ...
Steven Dascoli's user avatar
2 votes
4 answers
148 views

I have a set of data that I am attempting to manipulate to generate occurrence data that has associated time bins and latitude bins. My data consists of 19 latitudinal bins in intervals of 10 from -90 ...
ricoratso's user avatar
1 vote
2 answers
91 views

I have: keys = ["panda1", "panda2", "panda3"] values = [["eats", "shoots"], ["shoots", "leaves"], ["eats", "leaves&...
Mohamad Osama's user avatar
2 votes
3 answers
63 views

I have a data frame of events that have two columns for attendance IDs It looks like this. event<-c(1:20) name1<-c(101:120) name2<-c(rep(NA,15),201:205) df<-data.frame(event,name1,name2) ...
M3Lba's user avatar
  • 165
0 votes
3 answers
148 views

I have a dataframe like this: >>> df TYPE A B C D 0 IN 550 350 600 360 1 OUT 340 270 420 190 I want reshape it to this shape: AIN AOUT BIN BOUT CIN COUT ...
Sun Jar's user avatar
  • 351
0 votes
2 answers
223 views

data <- data.frame( T2_husband = rnorm(5), T2_wife = rnorm(5), T1_husband = rnorm(5), T1_wife = rnorm(5), Dyad_ID = 1:5 ) I have 5 columns in the dataset. However, I want to make dataset ...
Tube's user avatar
  • 195
0 votes
0 answers
29 views

I have a dataset with 4 columns, a product description and 3 years (1996, 2007, 2020). I want to change the table into the long format making so that it has 3 columns: Product, Year and the value that ...
Rafael Gomes's user avatar
2 votes
1 answer
56 views

I have spell data that includes an ID, a group indicator and the length of the spell. > d <- data.frame(ID = 1:10, + group = sample(c("a", "b"), 10, replace = T), ...
jkortner's user avatar
  • 652
2 votes
1 answer
108 views

I have the following melted sample dataframe: df_melted <- data.frame(ID = c(21, 21, 21, 21, 49, 49, 49, 49), instance = c(1, 1, 1, 1, 1, 1, 2, 2), variable = c("causeofdeath", "...
Andrea's user avatar
  • 878
5 votes
3 answers
401 views

I have a Polars dataframe with a lot of duplicate data I would like to consolidate. Input: shape: (3, 2) ┌─────┬──────┐ │ id ┆ data │ │ --- ┆ --- │ │ i64 ┆ str │ ╞═════╪══════╡ │ 1 ┆ a │ │ 1 ...
crazydragon777's user avatar
0 votes
0 answers
96 views

I am trying to implement a neural network using Keras and TensorFlow, and I encountered the following error: InvalidArgumentError: Input to reshape is a tensor with 64 values, but the requested shape ...
yamato's user avatar
  • 245
0 votes
0 answers
106 views

I have trained a yolov8 model in order to detect handwritten digits on paper with MNIST dataset. The problem is that the images on the dataset are 416x416 and once the model is trained it gets really ...
Javier Montes Pérez's user avatar

15 30 50 per page
1
2 3 4 5
260