How to save split data in panda in reverse order?

前端 未结 2 1903
耶瑟儿~
耶瑟儿~ 2021-01-24 10:52

You can use this to create the dataframe:

xyz = pd.DataFrame({\'release\' : [\'7 June 2013\', \'2012\', \'31 January 2013\',
                                 \'F         


        
2条回答
  •  清歌不尽
    2021-01-24 11:32

    Try reversing the result.

    dataframe[['year','month','day']] = dataframe['release'].str.rsplit(expand=True).reverse()
    

提交回复
热议问题