Simplify creating multidimensional array

0
open
daddybboston
daddybboston
Posted 3 months ago

Simplify creating multidimensional array #168

You can get rid of 2nd map if you use square brackets instead of curved brackets in the first map.

data = column1.zip(column2).zip(column3).zip(column4).map(lambda a_b_c_d : [a_b_c_d[0][0][0],a_b_c_d[0][0][1],a_b_c_d[0][1],a_b_c_d[1]] )