Questions tagged [transpose]

Transposition is an operation that applies to matrices wherein the rows and columns are swapped

The transpose of a matrix A is written as A'. The transpose of matrix A is another matrix B in which the element in the ith row and the jth column of A is in the jth row and the ith column of B. For example:

Suppose A =

[[11, 12, 13],
 [21, 22, 23],
 [31, 32, 33]]

Then, A' =

[[11, 21, 31],
 [12, 22, 32],
 [13, 23, 33]]

In scientific software for statistical computing and graphics, function t transposes a matrix.

3257 questions
0
votes
1 answer

How to match data to specified rows and columns in R (or transpose data with matching)

I had multiple datasets with information about the day shift in the company like this: Day1Set name shift work_time Worker1 1 8 Worker3 1 6 ... Day2Set name shift work_time Worker2 2 8 Worker3 2 6 ... Where "Workers" are…
kwadratens
  • 187
  • 15
0
votes
1 answer

How to Transpose the Entries in the 2nd Column of Grouped Data in Python to Each Be in Their Own Column

Basically I have data that looks like this, with the data grouped by Company and Program and the top 3 Programs by Revenue listed for each Company: Current Output That I would like to look like this, where the Companies are on the rows still, but…
0
votes
1 answer

VBA to Sum values based on 3 criteria and transposing result from tabular to visual layout

Good afternoon everyone! Im trying to summarize values found in column "O" of my sourceSheet based on the strings of three columns. The catch is that one of the columns (sourceSheet "A") is a Year-Month string, and the targetSheet I am summing to…
Nodnarb
  • 5
  • 2
0
votes
0 answers

How to transpose a Cython memoryview slice?

I am trying to calculate the transpose of a Cython typed memoryview slice (eg. a 2D part of a 3D array). I am encountering a transpose error specifically when I try to transpose a 2D slice of a 3D memoryview array. Here is my test code import numpy…
Eric
  • 25
  • 4
0
votes
0 answers

Transpose a matrix of unrestricted size using AVX-512

I'm trying to use avx-512 to do matrix transpose. But now my code can only transpose square matrix. If I don't specify the array size of A(for example 100) before calling the function, there will be *** stack smashing detected ***: terminated…
rcheni
  • 21
  • 3
0
votes
1 answer

Past with link and Transpose

I made some codes below, is to past with link and transpose in worksheet. But when I run second procedure('WT_Transpose'), an error occured: Object variable not set (Error 91). If you run each procedure in order in the editor it worked normally. But…
0
votes
1 answer

How to Repeat Transposing A Query Output matching values from a range reference over the whole column in Google Sheets?

I need to transpose column B values where column A values are matching over the entire column. I tested this but it's not working: =transpose(QUERY(A2:B,"select Col2 WHERE Col1 MATCHES '"&A2:A&"' ")) Current output: Item 1 Item 2 Item 3 Item…
0
votes
1 answer

Transpose or Pivot without using PIVOT or UNPIVOT SQL Editor in Metabase

I am trying to transpose my table columns and rows however transpose is not yet included in the functionality of Metabase. Now I am trying to manually do it in its SQL Editor however PIVOT is not a known functionality for some reason. I have a table…
0
votes
1 answer

Transferring information to a specific row within table using VBA (and errors)

The function of this program is a machine information archive. The user inputs information about the machine in a specific sheet, and then that information gets transferred to the archive based on what machine was specified. Machines are sorted by…
heiavieh
  • 27
  • 4
0
votes
0 answers

Convert long table to wide two columns

I have the long dataframe like: Item Count Per Chinese 3351 96.3% English 28 0.8% Math 100 2.87% I want to pivot to wide table like this: Item Chinese English Math Count 3351 28 100 Per 96.3% 0.8% …
Alegría
  • 179
  • 5
0
votes
1 answer

transpose dataframe with 1 row and ~1000 columns into dataframe with ~1000 rows and 2 columns

this seems like a simple thing to do but nevertheless I am kind of stuck with this assignment. I have a pyspark dataframe (created by reading a JSON file). It has almost 1000 column names, each column name referring to the unique identifier of the…
Antonius
  • 67
  • 9
0
votes
2 answers

Substituting " points = np.array([x, y]).T.reshape(-1, 1, 2)" with simpler steps

I am trying to generate the output of the following Python statement with simple-enough-to-understand steps, possibly using for-loops. I have studied the .reshape method and what -1 means as a dimension. Here is a simplified code snippet: import…
0
votes
1 answer

Google Sheets Transpose - return all data in every other column

I am using =transpose(filter('Top HP''s List'!A:A, (search("-P/TT", 'Top HP''s List'!A:A)))) to search a column for text, filter it, and then transpose it to a row. Is there any way to transpose to every other column in the row? eg, use Col A, leave…
0
votes
1 answer

How to transpose columns in PowerQuery without duplicating columns names

After I import big number of JSON files to Power Query, the last step I have to do is to transpose the the table (to make the rows are the columns). Unfortunately, when I did the transpose, I found duplicate columns! (see attachments to have an idea…
0
votes
0 answers

Is there an R function for transposing each row of a dataframe? (but not the dataframe itself)

Sample dataframe: name1 <- c('hi', 'bye') A <- c(1, 5) B <- c(2, 6) C <- c(3, 7) dummy.df <- data.frame(name, A, B, C) name1 A B C 1 hi 1 2 3 2 bye 5 6 7 What I would like to end up with: name letter frequency 1 hi A 1 2 hi …
katy123456
  • 21
  • 2
1 2 3
99
100