0

Df 1

Df 2

How do i get table 1(df 1) in the form of table 2 (df 2) in pandas?

  • Hello, welcome to SO. Please see [this guide](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) and edit your question properly. – Quang Hoang Nov 13 '20 at 15:11
  • please post data and don't post screenshot. – Equinox Nov 13 '20 at 15:13

2 Answers2

1

I would try to have 2 dataframes, one with only tesco1 and the other with only tesco2.

Then I would use a merge with

df.merge(df2,how='left',left_on=['client'],right_on=['client"])
gaut
  • 5,771
  • 1
  • 14
  • 45
0

I would use . explode like this

df2 =df1.explode(title)