Top "Reshape" questions

In R, Matlab, NumPy and APL, reshape functions allow data to be transformed into more convenient forms.

Reshape data frame from wide to panel with multiple variables and some time invariant

This is a basic problem in data analysis which Stata deals with in one step. Create a wide data frame …

r panel stata reshape data-manipulation
Numpy - slicing 2d row or column vector from array

I'm trying to find a neat little trick for slicing a row/column from a 2d array and obtaining an …

python arrays numpy slice reshape
melt multiple groups of measure.vars

I have a data.table containing a number of variables across multiple years, i.e: > dt <- data.…

r data.table reshape reshape2
R: Pivot the rows into columns and use N/A's for missing values

I have a dataframe that looks something like this NUM <- c("45", "45", "45", "45", "48", "50", "66", "66", "66", "68") Type <- c("A", "F", "C", "…

r dataframe pivot reshape melt
Does numpy reshape create a copy?

Is there a way to do a reshape on numpy arrays but inplace. My problem is that my array is …

numpy reshape in-place memory-consumption
Reshape multiple categorical variables to binary response variables

I am trying to convert the following format: mydata <- data.frame(movie = c("Titanic", "Departed"), actor1 = c("Leo", "…

r plyr reshape reshape2
How does numpy.reshape() with order = 'F' work?

I thought I understood the reshape function in Numpy until I was messing around with it and came across this …

python numpy reshape
Long and wide data – when to use what?

I'm in the process of compiling data from different data sets into one data set for analysis. I'll be doing …

r reshape dataformat