0

If have loaded a numpy file as a pandas dataframe

train_data = np.load('c:/data_raw/data.npy')
data = pd.DataFrame(train_data)
data.head()

The head looks like this enter image description here

My question: How can I split the second column (=1) which contains a list of variables into multiple columns?

Community
  • 1
  • 1
MrYouMath
  • 547
  • 2
  • 13
  • 34
  • @yatu: Thanks for the comment. But I dont want to split the columnt into multple rows but rather into multiple columns. – MrYouMath Jan 30 '19 at 15:16
  • @DanielMasejo: The linked question asks for the method to transform one list into multiple rows. But I want multiple columns instead. – MrYouMath Jan 30 '19 at 15:19

0 Answers0