I have two sets of data as
A=[array([1,2,3]),array([1,2,3,4]), ... array([11,13,2,1,5,7,9,0])]
B=[array([11,21,31]),array([16,27,38,48]), ... array([114,134,24,14,54,74,94,04])]
I want to save the arrays as consecutive x-y columns in a txt file such as:
in which the columns of A and B data are consequantly written.
However, because of different lenghts, I can not apply the command:
np.savetxt(np.transpose(A).
Any help is appreciated.
I tried using np.savetxt(np.transpose) but here the columns have different lengths and this command fails.
You could use pandas +
tabulateto generate the desired format with flexibility:Output: