I have a list of lists in Python
[[0 0 0 ... 0 0 0]
[0 0 0 ... 0 0 0]
[0 0 0 ... 3 3 3]
[0 0 0 ... 4 4 4]
[1 2 1 ... 2 2 2]
[1 3 1 ... 3 3 3]
[1 4 1 ... 4 4 4]
[2 3 2 ... 3 3 3]
[2 4 2 ... 4 4 4]
[3 4 4 ... 4 4 4]]
I want to take the mode of each index and create a single list. For example for index zero, most common element is 0 so new list should have 0 for that index. What is the most efficient and best way to do it? I thought of converting them to numpy arrays and working on arrays but couldn't figure out.