I have Pandas data frame and I am trying to add 0's in those lists where numbers are missing.
In the below data frame, the max length of the list is 4 which is in the 3rd position. accordingly, I will add 0's to the remaining lists.
Input:
Lists
0 [158, 202]
1 [609, 405]
2 [544, 20]
3 [90, 346, 130, 202]
4 [6]
Output:
Lists
0 [158, 202, 0, 0]
1 [609, 405, 0, 0]
2 [544, 20, 0, 0]
3 [90, 346, 130, 202]
4 [6, 0, 0, 0]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…