search

Home  >  Q&A  >  body text

Python can read a csv file but the content is wrong, but it can be opened with excel alone. How to solve it?

Convert csv file to xlsx file but cannot read it, displaying various errors

This is when excel is opened

This is read using Python
This is the error when reading using Python after changing to xlsx

淡淡烟草味淡淡烟草味2790 days ago834

reply all(3)I'll reply

  • 高洛峰

    高洛峰2017-05-18 11:02:22

    Pay close attention to see if there is any problem when reading 编码, resulting in uneven separation

    reply
    0
  • 怪我咯

    怪我咯2017-05-18 11:02:22

    You need to explain your mistakes clearly, such as printing them out, so others can help you!

    reply
    0
  • 迷茫

    迷茫2017-05-18 11:02:22

    There is no problem converting to utf-8 encoding, Chinese will be displayed correctly, please check the encoding

    reply
    0
  • Cancelreply