How to pivot a table?
이전 댓글 표시
I am trying to pivot a table in matlab so that I can upload it into a database.
The current data set mimics the following:
Column1 Column2 Column3 08-2021 09-2021 10-2021
ABC 123 !!!!!! 100 100 100
ABC 456 ???? 200 100 50
ABC 789 &&& 300 10 150
The desired result would to pivot the date columns to rows and have the other columns repeat. I can do this i a couple other programs so I'm sure there is probably a command in matlab to do it, but I just dont know it.
Column1 Column2 Column3 Date Value
ABC 123 !!!!!! 08-2021 100
ABC 123 !!!!!! 09-2021 100
ABC 123 !!!!!! 10-2021 100
ABC 456 ???? 08-2021 200
ABC 456 ???? 09-2021 100
ABC 456 ???? 10-2021 50
ABC 789 &&& 08-2021 300
ABC 789 &&& 09-2021 10
ABC 789 &&& 10-2021 150
Thank you,
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!