0

According to the docs https://pandas.pydata.org/docs/reference/api/pandas.Series.str.split.html, I want to split this one column of numbers into 2 columns based on default whitespace. However, the following doesnt appear to do anything.

self.data[0].str.split(expand=True)

The df is of shape (1,1) but would like to split into (1,2)

Output

                              0 
0      1.28353e-02  3.24985e-02

Desired Output

               0            1 
0      1.28353e-02  3.24985e-02

PS: I dont want to specifically create columns A and B

shoggananna
  • 545
  • 5
  • 9
  • @Rajat Mishra: I have a simplied version here. In fact there 6 numbers in the one column. I dont want to specifically create columns A,B,C etc – shoggananna Oct 15 '22 at 10:08

0 Answers0