0

DataFrame image

Focus on the 'Image_data' column. I want to split the arrays present at each index into different columns. The arrays are of different length at each index. So, I need to split according to the longest array. If one array is smaller than the longest array, it should place '0.0' in that extra column for smaller array.

Methods I have tried:

  1. I have tried Padding the arrays using the length of the longest array.
  2. pd.DataFrame(df.iloc[:,0].to_list())

Errors:

  1. pad_width must be of integral type.
  2. Error of no type (tells me ErrorType '')

Can someone help me split the arrays into different columns??

Sameer
  • 1
  • 1
  • Does this answer your question? [Split a Pandas column of lists into multiple columns](https://stackoverflow.com/questions/35491274/split-a-pandas-column-of-lists-into-multiple-columns) – Mahesh Vashishtha Dec 06 '22 at 18:05

0 Answers0