only|only single character unicode strings can be converted to Py_UCS4, got length 0

read_table和read_csv读写文本
only|only single character unicode strings can be converted to Py_UCS4, got length 0
文章图片

文本文件的编码格式要跟你的encoding的编码格式一样,不然会出现一下的错误
only single character unicode strings can be converted to Py_UCS4, got length 0
意思是说 :只有单字符unicode(编码格式)字符串可以转换为Py_UCS4,长度为0
only|only single character unicode strings can be converted to Py_UCS4, got length 0
文章图片

csv文件的创建
【only|only single character unicode strings can be converted to Py_UCS4, got length 0】only|only single character unicode strings can be converted to Py_UCS4, got length 0
文章图片

建立一个文本文本,然后另存,在文件名 txt 改成 csv 编码也改成utf-8或者别的 但跟python里面自己写的编码要一直 否则会出错

    推荐阅读