成功解决RuntimeError: Decompression ‘SNAPPY‘ not available.  Options: [‘GZIP‘, ‘UNCOMPRESSED‘]

成功解决RuntimeError: Decompression 'SNAPPY' not available.  Options: ['GZIP', 'UNCOMPRESSED']

 

 

 

目录

解决问题

解决思路

解决方法


 

 

 

 

解决问题

D:\ProgramData\Anaconda3\python.exe E:/Python_Program/0925KBQNodel/抗辩期模型_v01_1105.py
Traceback (most recent call last):
  File "E:/Python_Program/0925KBQNodel/抗辩期模型_v01_1105.py", line 31, in <module>
    df = pd.read_parquet('./data_contest_20201022_sample.parquet')
  File "D:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parquet.py", line 317, in read_parquet
    return impl.read(path, columns=columns, **kwargs)
  File "D:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parquet.py", line 212, in read
    return parquet_file.to_pandas(columns=columns, **kwargs)
  File "D:\ProgramData\Anaconda3\lib\site-packages\fastparquet\api.py", line 399, in to_pandas
    index=index, assign=parts)
  File "D:\ProgramData\Anaconda3\lib\site-packages\fastparquet\api.py", line 228, in read_row_group
    scheme=self.file_scheme)
  File "D:\ProgramData\Anaconda3\lib\site-packages\fastparquet\core.py", line 355, in read_row_group
    cats, selfmade, assign=assign)
  File "D:\ProgramData\Anaconda3\lib\site-packages\fastparquet\core.py", line 332, in read_row_group_arrays
    catdef=out.get(name+'-catdef', None))
  File "D:\ProgramData\Anaconda3\lib\site-packages\fastparquet\core.py", line 199, in read_col
    dic = read_dictionary_page(infile, schema_helper, ph, cmd)
  File "D:\ProgramData\Anaconda3\lib\site-packages\fastparquet\core.py", line 157, in read_dictionary_page
    raw_bytes = _read_page(file_obj, page_header, column_metadata)
  File "D:\ProgramData\Anaconda3\lib\site-packages\fastparquet\core.py", line 25, in _read_page
    column_metadata.codec,
  File "D:\ProgramData\Anaconda3\lib\site-packages\fastparquet\compression.py", line 128, in decompress_data
    (algorithm.upper(), sorted(decompressions)))
RuntimeError: Decompression 'SNAPPY' not available.  Options: ['GZIP', 'UNCOMPRESSED']

 

 

解决思路

运行时错误:解压“SNAPPY”不可用。选择:(GZIP,“压缩”)

 

 

 

 

解决方法

pip install python-snappy
pip install pyarrow
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple python-snappy
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyarrow

 

哈哈,大功告成!

 

 

 

 

 


 

一个处女座的程序猿 CSDN认证博客专家 华为杯研电赛一等 华为研数模一等奖 国内外AI竞十
人工智能硕博生,拥有十多项发明专利(6项)和软件著作权(9项),多个国家级证书(2个国三级、3个国四级),先后获得国内外“人工智能算法”竞赛(包括国家级、省市级等,一等奖5项、二等奖4项、三等奖2项)相关证书十多个,以上均以第一作者身份,并拥有省市校级个人荣誉证书十多项。正在撰写《人工智算法最新实战》一书,目前已37万字。
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 代码科技 设计师:Amelia_0503 返回首页
实付 29.90元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值