How do I change data-type of pandas data frame to string with a defined format?

后端 未结 3 2063
醉酒成梦
醉酒成梦 2020-12-24 02:14

I\'m starting to tear my hair out with this - so I hope someone can help. I have a pandas DataFrame that was created from an Excel spreadsheet using openpyxl. The resulting

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-24 02:53

    If you could reload this, you might be able to use dtypes argument.

    pd.read_csv(..., dtype={'COL_NAME':'str'})
    

提交回复
热议问题