Suppose I have a Dictionary like
{
"John" : [1, 2, 3],
"David" : [2, 3],
"Stacy" : [3]
}
What do I need to do to get a resulting Dictionary that is switching the keys and values
Ex.
{
1 : ["John"],
2 : ["John", "David"],
3 : ["John", "David", "Stacy"]
}
Looking to do this kind of transformation on a large dataset, ~170k keys, and values list with lengths up to 50k items. Anything else I need to worry about.