当并非所有文件都是utf-8编码时,poetry run pytest -v上的测试就会失败。./.pyenv/versions/3.8.2/lib/python3.8/codecs.py:322:中,在read_text中以解码方式返回f.read())= self._buffer_decode(data,self.errors,final) E UnicodeDecodeError:'utf-8‘编解码器不能<em
我有以下代码: df_from_each_file = (pd.read_csv(f, encoding = 'utf-8') for f in all_files)
data = pd.concat(df_from_each_file, ignore_index=True) 它会给出以下错误: 第一行运行得很好,但是第二行给出了这个错误: UnicodeDecodeError:'utf-8‘编解码器无法对位置1中的字节0