D. Christopher
D. Christopher

Reputation: 45

Is it possible to transform a pivot table into an ordinary table?

So basically, I was wondering if it's possible to transform the table from:

this

into

enter image description here

using excel? The table I presented are constructed manually but I also have a data which consist of 2500x26 cells which is not possible at all for manual constructing. If not, is it possible if it's done by python? Thank you very much.

Upvotes: 2

Views: 39

Answers (1)

Adam.Er8
Adam.Er8

Reputation: 13393

you should be able to it using pandas, with .unstack() which does exactly this.

something similar to this:

import pandas as pd

df = pd.read_excel("in_file.xlsx")
df = df.unstack()
df.to_excel("out_file.xlsx")

Upvotes: 2

Related Questions