update: I have been asked to provide as csv instead of a picture. Here is a google sheet with 40 rows of the data. The actual csv is 20k-40k rows. https://docs.google.com/spreadsheets/d/1HsqF_oqqoBoN2nwSH_7SQI_5w5D-THRI-CQslNW6LkY/edit?usp=sharing
I have rows of data that I need to split into columns. I know all the simple ways of doing this with pandas but can't use a simple solution like just splitting on a "," or " ". I have attached a picture below to show an example of my data. This is likely quite simple for someone with more skill than me. The reason I can't just split on a space and work with it that way is some players have "jr." at the end of their name or there is a guy named "chi chi" and the space in his first name can ruin everything. My ideal output would be extracting the name after each position (P,C,1B,2B,3B,SS,OF). So if the row was P John Smith P Dave Smith C Ryan Smith it would output "John Smith" in one column and "Dave Smith" in the next column and so on...
There are (2) "P" and (3) OF in each row, everything else is (1).
Data example: