How to transpose data to change row into column using IDEAScript

2 posts / 0 new
Last post
gideon7702
Offline
Joined: 12/03/2023 - 23:33
How to transpose data to change row into column using IDEAScript

Hello, i want to ask on how to code using IDEAScript to transpose data from row to column. here is the scenario :
I got an excel source data and the first row can't be used as field name while each row that has data is divided with blank row one after another. the writing format is like form with first column contains form labels and second is the answer. i put the screenshots of the expected result if i transpose the data below. i also put the test file below.
Is there a way to script this kind of data transpose in IDEA? 
Thank you.

Images: 
klmi
Offline
Joined: 02/13/2019 - 08:41

I don't know a transpose function in IDEA. As workaround I see two possibilities
1) Generate a pivot table
2) Export database from IDEA to CSV
Import CSV via Python to Pandas DataFrame
Transpose (search for pandas.DataFrame.transpose)
Export DataFrame to CSV
Import CSV to IDEA