So I found this: Numpy: Fix array with rows of different lengths by filling the empty elements with zeros
But what I actually want is this:
mylist = [[1],[1,2],[1,2,3]]
mylist.fill()
>>> [[0,0,1], [0,1,2], [1,2,3]]
I know that pandas' fillna fills but the 0 are at the right part of my matrix and I need them at the left part. Any clues?