Учитывая:
import pandas as pd
lis1= ('baseball', 'basketball', 'baseball', 'hockey', 'hockey', 'basketball')
lis2= ('I had lots of fun', 'This was the most boring sport', "I hit the ball hard", 'the puck went too fast', 'I scored a goal', 'the basket was broken')
pd.DataFrame({'topic':lis1, 'review':lis2})
topic review
0 baseball I had lots of fun
1 basketball This was the most boring sport
2 baseball I hit the ball hard
3 hockey the puck went too fast
4 hockey I scored a goal
5 basketball the basket was broken
Мне нужно это как pd.DataFrame:
lis1= ('baseball', 'basketball', 'hockey')
lis2= ("I had lots of fun, I hit the ball hard", "This was the most boring sport, the basket was broken","the puck went too fast I scored a goal")
pd.DataFrame({'topic':lis1, 'review':lis2})
topic review
0 baseball I had lots of fun, I hit the ball hard
1 basketball This was the most boring sport, the basket was...
2 hockey the puck went too fast I scored a goal
Я запутался, потому что столбец, по которому я хочу сгруппировать, - это строка иЯ хотел бы объединить строки вместе.Строки не должны быть разделены запятой.