Questions tagged [transpose]
Transposition is an operation that applies to matrices wherein the rows and columns are swapped
2,975
questions
0
votes
1
answer
15
views
How to dynamically pivot/transpose columns in pyspark dataframe
Input:
ID
Question 1 response
Question 1 date
question 1 expected response
......
Question n response
Question n date
question n expected response
123
value a
17-Aug-22
value b
.....
value c
15-Aug-...
1
vote
1
answer
39
views
How to filter data with multiple duplicate quantity
I have a table in Google Sheet, where are listing items (A-Z). I can fill qty of this items in column QTY. How to list in another sheet all of qantitied items and appear as many times as is entered (...
1
vote
1
answer
31
views
Formula that splits data into separate sections based on a divider (blank cell)
I am trying to find a formula which splits data into separate columns based on a blank column.
As this is imported through another sheet and uses a divider:
-1
votes
1
answer
37
views
Google sheets - calculating price from multiple dropdown selections [closed]
I would like to calculate the total price in column N (Materials Price) based on the multiple dropdown selections in column M (Materials). How would I accomplish this? The materials and corresponding ...
0
votes
0
answers
12
views
How to Dynamically Transpose rows to columns in postgressql
I've Table in following picture and we need to take only one column out and create a new table with multiple columns (using rows from column3) as below. Postgresql. 1: https://i.stack.imgur.com/IUeTW....
0
votes
1
answer
28
views
Postgres table transformation: transposing values of a column into new columns
Is there a way to transpose/flatten the following table -
userId
time window
propertyId
count
sum
avg
max
1
01:00 - 02:00
a
2
5
1.5
3
1
02:00 - 03:00
a
4
15
2.5
6
1
01:00 - 02:00
b
2
5
1.5
3
1
02:...
0
votes
0
answers
7
views
Tranposing and rearranging dataframe - python [duplicate]
I have a dataframe that I would like to transpose and rearrange based on the 'date' column. Have provided a small portion of the dataframe.
import pandas as pd
data = [['1994-01-31','stock_1', 0.12]...
1
vote
1
answer
31
views
How to transpose in power bi desktop
I am having a table with 3 columns, where I need to transpose using Power Bi desktop. This is the structure I need:
I started using Power Query Editor, but seems like it to not transforming the way I ...
1
vote
1
answer
37
views
Sorting Multiple Columns in an Array
I have an array with 11 columns, containing only TRUE or FALSE values. I want to sort each column individually, such that all TRUE values are sorted to the top of each column.
This seems to work:
={{...
1
vote
2
answers
30
views
Split strings in a google sheet cell into multiple rows?
In this thread I got the correct answer, but when I delete the values in columns B and C there are no results
Question link
Here is the google sheets formula
=INDEX(IFERROR(SPLIT(FLATTEN(FLATTEN(
...
0
votes
1
answer
58
views
Transposing Values In a Listbox
Good day,
I am trying to transpose the values added to my listbox via a query. Also does anyone have tips on how to get the column names on the Column Header. This is what the values in my listbox ...
1
vote
1
answer
64
views
How to transpose multiple columns and repeat specific cells
Is there a way to Split strings in a google sheet cell into multiple rows?
Example:
-1
votes
2
answers
30
views
How to transpose a column in a pandas dataframe with its values drawn from a different column? [duplicate]
I have a pandas dataframe with column "Code" (categorical) with more than 100 unique values. I have multiple rows for same "Name" and would like to capture all of information ...
0
votes
1
answer
18
views
SAS Transpose Variable to Observations
I have a set of data which has multiple columns but only one observation.
I need to transpose the data to have multiple observations with 2 column of data.The very first column in my Data is the ...
0
votes
1
answer
11
views
pandas transpose specific columns to rows keep custom attributes [duplicate]
I loaded an excel file in a dataframe which contains questions, answers and some custom attributes in the first three columns. I would like to transpose all the answers to rows but keep the first ...
1
vote
1
answer
35
views
Convert columns to rows and repeat row labels in google sheets
I am trying to convert table 1 to the format in table 2. How can I do it in google sheets ?
Thank you very much.
Table 1 -
Table 2 -
0
votes
1
answer
16
views
Transpose columns pandas dataframe [duplicate]
I have a DF like this:
ID
Name
Mail
Phone1
Phone2
Mail1
Mail2
contact phone
contact mail
70
DASS ARGENTINA SRL
info@iricresanluis.com.ar
2664941642
2664941644
info@iricresanluis.com.ar
info_tec@...
1
vote
1
answer
19
views
Rotate table based on drop down input
Data
I have a table B3:F7 with a changing range, more or less rows and columns.
Objective
I want to Rotate the original table using the input from the drop down I2:M2 to get the result like 90, 180, ...
0
votes
2
answers
36
views
Transpose key -> value table (rows) into columns
We have a metadata pair key value table where we store daily kpis on a similar format to:
+------+---------+-------------+------------+
| id | key | value | last_update|
+------+---------...
-1
votes
0
answers
15
views
Transpose multiple rows to single column/row in tSQL
I have 2 tables I need to join for a single output that are linked by a unique code. Sounds simple except the second table will have multiple rows for each row in the first table.
In the output I ...
0
votes
1
answer
22
views
Manipulate dataframe with pandas to transpose columns and adjust dates?
How can I manipulate a dataframe like this, making a transpose that joins one under the other and arranges it in the form of dates?
Let it be by transforming this existing dataframe, without messing ...
0
votes
1
answer
39
views
Transpose DataFrame Spark Scala
Task:
I need to transpose the dataframe. I have written some solution, but I wish to achieve better performance.
INPUT:
val columnsNames = List(col_name1, col_name2)
DataFrame:
+-----------+----------...
1
vote
2
answers
34
views
How to convert column heading to column values and its values in another column in postgresql
I have a table like this say the table name is online-websites and the values it has is the number of times I used it.
Amazon
Flipkart
Myntra
5
4
3
I want to convert it to following format
Website ...
0
votes
1
answer
27
views
Transpose of rows of a column to many column [duplicate]
I want to change the data format from:
Gen traits data
G1 ph 10
G2 ph 14
G1 qp 41
G2 qp 14
G1 ser 74
G2 ser 47
G1 wer 34
G2 wer 25
to:
Gen ph qp ser wer
G1 10 41 74 34
G2 14 14 ...
0
votes
2
answers
49
views
Snowflake SQL Statement Pivot will not work with query I am using
Below is the Snowflake query. I know it is ugly but it is what I have to work with here. The problem is my PIVOT isn't working. Everything up to that point works but when I try the Pivot I get an ...
-1
votes
1
answer
35
views
SQL Query to Join Two Tables where data in one table is transposed
I'm trying to join two tables but not getting the desired results. Im new to SQL and will need help to joining these two tables.
The data in Table 2 is transposed and the table will only be populated ...
0
votes
1
answer
45
views
Reference to a column in PowerQuery
I need to transpose my data into a format that I can use in SQL and Power BI. Where my first 10 columns are all fixed and repeated for each next columns, and I have 24 for sequential months that ...
-1
votes
0
answers
22
views
I am reading a csv/Excel file and how to transpose and omit the duplicate values
My CSV file data :
enter image description here
My expected output data :
enter image description here
Is there any possible,how we can transpose the data.My current script :
csv=b''join(csv).split(b'/...
-4
votes
0
answers
23
views
How to transpose a matrix without numpy or zip or any sort of import and also doesn't create a new list? [duplicate]
I need to make a program which takes a matrix and transposes it.
For example it takes this input:
f = [[1, 2], [1, 2]]
and turns it into this:
f = [[1, 1], [2, 2]]
I know that there are a lot of ...
1
vote
1
answer
51
views
Excel Transposing the Vertical Data to Horizontal but following the filter rows
Recently I have struggled to solve one problem regarding Transposing the data from vertical to horizontal, Following the filter rows pattern.
So I have created A table with a few variables, I want to ...
0
votes
0
answers
7
views
How to transponse with pandas [duplicate]
I want to Transponse with pandas the following Table:
Table to Transpose
to the following Table:
Final Table
Thanks for the help!
-1
votes
0
answers
23
views
How to switch x axis at Autohotkey code for an Excel chart?
I have a AHK code to do and Excel chart. It work fine but I nedd to switch the series with the X axis.
I try to do with
XL.ActiveChart.SeriesCollection(1).XValues := XL.ActiveSheet.Range("A2:A4&...
0
votes
0
answers
51
views
Transposing rows to columns in sql [duplicate]
I have a database with the following design
Standards:
ID | Standard | Mentor
1 | X | Mr. M
2 | IX | Mrs. S
Subjects:
ID | Subject | StandardID
1 | Adv. ...
-2
votes
0
answers
23
views
Postgresql - is it possible to produce a view transposing another view?
[enter image description here][1]
The result should be columns with values regarding correspondent year entries.
[1]: https://i.stack.imgur.com/auLVe.png
0
votes
2
answers
18
views
Oracle - Transpose (Pivot)
I have a table like this:
ID
C1
C2
C3
1
1
0
1
2
0
1
1
3
1
0
1
and I want to get to this:
ID
Category
Category_Value
1
C1
1
1
C2
0
1
C3
1
2
C1
0
2
C2
1
2
C3
0
3
C1
1
3
C2
0
3
C3
1
How ...
0
votes
0
answers
28
views
SSMS transpose table to show old and new status on same row
I'm new to SSMS and I'm having a hard time solving this challenge. So I'm hoping you guys can put me in the right direction.
I have a type 2 slowly changing dimension table, which keeps track of ...
0
votes
1
answer
50
views
Transpose Array Into Separate Columns and Normalize Data
I have a string in Cell B6:
AB(1)CD(3)EFG(3)
I have a click and drag formula that will delimit each section of the string, starting in Cell C6:
=TRIM(MID(SUBSTITUTE(SUBSTITUTE($B6,"(","...
0
votes
1
answer
22
views
Pandastable transpose columns so they are vertical
i am using pandastable to display pandas dataframes in a tkinter GUI. I have one dataframe that only has one row and three columns so I want to display it vertically to save space in my GUI.
The ...
2
votes
1
answer
24
views
Pandas Transpose part of dataframe
I try to transpose a part of dataframe but I don't if I can have the result needed.
My df is like (excel extract):
code A
code B
June
July
August
324325
3243.
0,3.
0,5.
0,4.
884543
7954.
0,1.
0,5.
...
0
votes
1
answer
31
views
Transpose a table using pandas [duplicate]
I have a dataframe that looks like this:
A
type
val
first
B
20
second
B
30
first
C
200
second
C
300
I need to get it to look like this:
A
B
C
first
20
200
second
30
300
How do I do this ...
0
votes
0
answers
43
views
Not able to copy data from Excel sheet to array
I am trying to copy data from excel to an array, the last used row can be the limit of the excel row (1048576). It is able to copy 65535 data rows only. Could someone help me on this?
Dim ...
-1
votes
1
answer
24
views
Transpose data in Mysql
suppose I have the following data, how can I transpose the data with MYSQL so that the output looks like the following table?
WITH mydata
AS (SELECT '123' AS id,
1 AS he_has_logo,
0 AS i_have_logo,...
1
vote
1
answer
24
views
Google Sheets Arrayformula with some sort of concatenate/textjoin/something similar for all rows
I'm trying to do an arrayformula that goes down all rows. I want it to grab the text from a specific row if the row that it's on meets conditions.
Here's an example of what I'm trying to do: have a ...
2
votes
1
answer
52
views
How to write a formula in Google Spreadsheet that will count sum of multiplied values using VLOOKUP function
I have created a spreadsheet to track my crypto portfolio.
Here is the simple view of the task, that I'm trying to solve:
I want to:
Take the number (amount) from each cell (A3:C3)
Take the Currency ...
1
vote
2
answers
87
views
How to convert query to arrayformula
I would like to ask on how to convert this query to an arrayformula:
=query({unique(filter(A$2:A,B$2:B=B2)),sequence(rows(unique(filter(A$2:A,B$2:B=B2))))},"select Col2 where Col1 = '"&...
0
votes
0
answers
22
views
why my code to transpose an array doesn't work correctly [duplicate]
I've composed a code to transpose a 2d array in Python but it doesn't work correctly and all rows of
the transposed array are similar to last column of the original array. Can anybody help me to find ...
1
vote
1
answer
50
views
How do I transform a single row of repeating data instances into multiple rows, of one instance per row? (Google Sheets)
I have a dataset in Google Sheets that is a single row; each data instance is 22 cells wide. I would like to transform the sheet into multiple rows, with each row containing the 22 cells for a single ...
0
votes
1
answer
10
views
Syncing a cell from an outside sheet to multiple rows in the master sheet with IMPORTRANGE, SPLIT, TRANSPOSE
I am having issues with syncing some data from an outside spreadsheet to a master spreadsheet. The problem lies in the fact that there are multiple strings in each cell of the column I wish to sync. I ...
0
votes
0
answers
17
views
How to transpose (and reshaping) a long dataset in a more compact one? Using R [duplicate]
I have this dataset with N.treated=171 and N.controls=164. Thus the dataset has 171*164=28044 rows. (DIM: 28044 * 3)
Treated Control RESULT
1A 99A Lose
1A 99B Win
1A 99C ...
0
votes
3
answers
30
views
transposing in SAS software
just have some problems with transposing data in SAS; in particular, it could be because the year headings are in year format 2013, 2014, etc but have no idea how to resolve it
so for instance-->
...