【问题标题】:Pyarrow unable to locate parquet file in pandasPyarrow 无法在熊猫中找到镶木地板文件
【发布时间】:2022-11-03 21:48:36
【问题描述】:

Pyarrow 找不到我的镶木地板文件,我不知道为什么。也许路径没有被读取?

我的代码:

import pandas as pd

df = pd.read_parquet('parquetfile1.parquet', engine='pyarrow')


错误:

C:\Users\name\Desktop\unit_tests>py run_file.py
Traceback (most recent call last):
  File "C:\Users\name\Desktop\tests\run_file.py", line 3, in <module>
    df = pd.read_parquet('parquetfile1.parquet', engine='pyarrow')
  File "C:\Users\name\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\parquet.py", line 503, in read_parquet
    return impl.read(
  File "C:\Users\name\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\parquet.py", line 244, in read
    path_or_handle, handles, kwargs["filesystem"] = _get_path_or_handle(
  File "C:\Users\name\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\parquet.py", line 102, in _get_path_or_handle
    handles = get_handle(
  File "C:\Users\name\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\common.py", line 865, in get_handle
    handle = open(handle, ioargs.mode)
FileNotFoundError: [Errno 2] No such file or directory: 'parquetfile1.parquet'

【问题讨论】:

    标签: python parquet pyarrow


    【解决方案1】:

    如果您提供文件的完整路径,它应该可以工作。

    【讨论】:

      猜你喜欢
      • 2020-01-16
      • 2022-11-24
      • 2020-04-20
      • 1970-01-01
      • 2019-02-05
      • 1970-01-01
      • 2020-03-05
      • 2018-04-17
      • 2018-12-01
      相关资源
      最近更新 更多