Hi there! I have a CSV file with sample data and a lot of columns. I need to extract some data from this file. The new file should have only two columns (Project ID and Project Name) from the original file. In addition to that, I need to create three more columns (Bedroom Type, Stat, and Stat Value). The rows under these columns should be the column names.
For example, I have the columns Project ID, Project Name, ....., 0 Bedroom sizes from, 0 Bedroom sizes to, ......, 3.5 Bedroom prices from, 3.5 Bedroom prices to. I don't need any data from the columns in between. The values in the bedroom columns are numerical.
I need the new CSV file to fill rows with data such as:
1, Condo, 0 Bedroom, sizes from, 482
1, Condo, 0 Bedroom, sizes to, 580
......
1, Condo, 3.5 Bedroom, prices from, 1482
1, Condo, 3.5 Bedroom, prices to, 1580
How can I achieve this? There are 50 unique projects in the file. I need all of them, but the new CSV file should have them like above. What is the best method?