I have a table like this.
user 01/12/15 02/12/15 someBool
u1 100 300 true
u2 200 -100 false
u3 -50 200 true
I want to repartition the date columns into two columns date
and value
like this.
user date value someBool
u1 01/12/15 100 true
u1 02/12/15 300 true
u2 01/12/15 200 false
u2 02/12/15 -100 false
u3 01/12/15 50 true
u3 02/12/15 200 true
How to do this in python ?
Is pivot_table
in pandas
helpful?
If possible provide code/psuedo code & give details on python version.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…