Quite new to Python so apologies if there is an obvious fix to this. I'm working with some football data and the player names have come out like this:
To remove everything after the "\" I tried:
head, sep, tail = df2["Player"].partition("\\")
head = df2["Player"]
To which I'm getting the following error:
"AttributeError: 'Series' object has no attribute 'partition'"
What am I doing wrong?