Python - Turn all items in a Dataframe to strings

后端 未结 4 1058
梦毁少年i
梦毁少年i 2020-12-15 16:18

I followed the following procedure: In Python, how do I convert all of the items in a list to floats? because each column of my Dataframe is list, but instead o

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-15 17:02

    This worked for me:

    dt.applymap(lambda x: x[0] if type(x) is list else None)
    

提交回复
热议问题