I wish to explode my dataset based on a specific column in Python.
Data
id type date stat energy
aa ss Q1 2022 3 10
aa ss Q2 2022 2 10
bb uu Q1 2022 1 15
bb uu Q2 2022 3 15
cc ii Q1 2022 0 0
Desired
id type date stat energy
aa ss Q1 2022 3 10
aa ss Q1 2022 3 10
aa ss Q1 2022 3 10
aa ss Q2 2022 2 10
aa ss Q2 2022 2 10
bb uu Q1 2022 1 15
bb uu Q2 2022 3 15
bb uu Q2 2022 3 15
bb uu Q2 2022 3 15
cc ii Q1 2022 0 0
Doing
df.explode(list['stat'])
Any suggestion is appreciated