I am currently starting to get into pandas and I was wondering, if there is a function giving me common categories of items in a DataFrame. To visualize:
These are the data I have (highly simplified example, obviously)
Discipline Person
0 football Alanis
1 football Bernard
2 football Delilah
3 basketball Charlie
4 basketball Delilah
5 tennis Charlie
And I'd like to find out, which two people share a discipline, ideally in the form of a matrix like so:
Alanis Bernard Charlie Delilah
Alanis True True False True
Bernard True True False True
Charlie False False True True
Delilah True True True True
Alternatively, it could be a function returning a list of common categories.
I don't even know if pandas is the best tool for a task like this one (probably not), as I said, I'm quite a noob still. I do appreciate your help though.
Thanks!