I would like to split column hobbies
by comma from the following dataframe, then vertically set them respectively:
id name hobbies
0 1 John TV, computer
1 2 Steve travel, film
2 3 Jim swim, jog
How could I get an output like this? Thank you.
id name hobbies
0 1 John TV
1 1 John computer
2 2 Steve travel
3 2 Steve film
4 3 Jim swim
5 3 Jim jog