python opens text file with a space between every character

前端 未结 8 1598
野性不改
野性不改 2021-02-18 17:27

Whenever I try to open a .csv file with the python command fread = open(\'input.csv\', \'r\') it always opens the file with spaces between every single character.

8条回答
  •  礼貌的吻别
    2021-02-18 17:54

    It did never ocurred to me, but as truppo said, it must be something wrong with the file.

    Try to open the file in Excel/BrOffice Calc and Save As the file as Csv again.

    If the problem persists, try a subset of the data: fist 10/last 10/intermediate 10 lines of the file.

提交回复
热议问题