Unpivoting a Pandas DataFrame
How to massage a Pandas DataFrame into the shape you need
Published in
3 min readJan 29, 2021
Introduction
Last article we shared an embarrassing moment which encouraged us to learn and use Pandas to pivot a DataFrame. Today we are going to look at Pandas built-it .melt()
function to reverse our pivoted data. The .melt()
function comes in handy when you need to reshape or…