I want to create a boolean Dataframe from sets,
So there are 4 sets, each containing a collection of names
a = { a collection of names }
b = { another collection of names}
c = { ... }
d = { ... }
And the result should be a Dataframe that looks like this:
Name | a | b | c | d
--------------------------------------
'John' | True | True | False | True
'Mike' | False | True | False | False
.
.
.
I want a way to do this in Python using Pandas and in an efficient manner.
One way to do is to pick each name and see if it's in each set and then add that name to the Dataframe. But there should be faster ways like merging the sets and applying some function.