I'm trying to copy the row based on how many slashes or roster positions there are based on the 'Roster Position' column and keep every other column along with it. Any ideas? I'll show you what it looks like and what I want it to look like.
Before Image or what it currently looks like
This is what I'm trying to achieve, but I don't know how to write it out.
I'm using python and pandas.
I tried many different things, but couldn't figure it out.


Try using
.str.splitto create a list andexplode:Output:
You can add
.drop('Roster Position', axis=1)to eliminate that column if you would like.