panda grouping dates by variable with transposed value variables
I had read this post
panda grouping by month with transpose
and it gave me the nearest answer to my question but not the completely solution.
How would I get somewhat like the reverse output?
My target is: I have a pivoted df with a grouped text variable like above in the second pic and dates are my columns. But I would like to get the dates grouped by type and the text variable values are my new columns. It would something like txt and transdate would be transposed but grouped by type. I had used some approaches like grouppy, unstack, reshape but none of them worked completely well and I don't get the correct result.
Posted this as a unique question in hope to get more suggestions and help from the community. Thanks in advance to all of you!
Topic groupby reshape time-series pandas
Category Data Science