Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support different suffixes for parquet files #61

Open
gschwend opened this issue Mar 31, 2023 · 8 comments
Open

Support different suffixes for parquet files #61

gschwend opened this issue Mar 31, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@gschwend
Copy link
Member

Please add .parquet and .parq to the list of valid file extensions for parquet files.
These two options were used in DP0.1 and DP0.2 catalog files, respectively.

@gschwend
Copy link
Member Author

@eacharles I can contribute with this piece of code. Just add me to this repo, if you agree, so I can assign the issue to myself.

@eacharles
Copy link
Collaborator

eacharles commented Mar 31, 2023 via email

@gschwend
Copy link
Member Author

@eacharles can you double-check if the upgrade you did really worked? I am trying to push a new branch with the commits but it returns as permission denied:

(tables_io) julia@dell-inspiron ~/github/tables_io/docs (issue/61/parquet-suffixes) $ git push --set-upstream origin issue/61/parquet-suffixes
Username for 'https://github.com': gschwend
Password for 'https://[email protected]': 
remote: Permission to LSSTDESC/tables_io.git denied to gschwend.
fatal: unable to access 'https://github.com/LSSTDESC/tables_io.git/': The requested URL returned error: 403

@eacharles
Copy link
Collaborator

eacharles commented Mar 31, 2023 via email

@gschwend
Copy link
Member Author

Thanks!

@gschwend gschwend self-assigned this Mar 31, 2023
@eacharles
Copy link
Collaborator

closed with #62

@hdante
Copy link

hdante commented May 3, 2023

Hello, is it possible to reopen this issue ? I'm not being able to open files with the extensions ".parq" and ".parquet" because read(), a FileNotFoundError exception is thrown (but the file described in the exception message ends up with the ".pq" extension again):

>>> f = tables_io.read('objectTable_tract_3635_DC2_2_2i_runs_DP0_2_v23_0_1_PREOPS-905_step3_12_20220218T172932Z.parq')
Traceback (most recent call last):
  File "/home/hdante/Trabalho/LineA/local/lib/python3.10/site-packages/tables_io/ioUtils.py", line 792, in readPqToDataFrames
    dataframes[key] = readPqToDataFrame(f"{basepath}{key}.pq")
  File "/home/hdante/Trabalho/LineA/local/lib/python3.10/site-packages/tables_io/ioUtils.py", line 747, in readPqToDataFrame
    return pd.read_parquet(filepath, engine='pyarrow')
  File "/home/hdante/Trabalho/LineA/local/lib/python3.10/site-packages/pandas/io/parquet.py", line 503, in read_parquet
    return impl.read(
  File "/home/hdante/Trabalho/LineA/local/lib/python3.10/site-packages/pandas/io/parquet.py", line 244, in read
    path_or_handle, handles, kwargs["filesystem"] = _get_path_or_handle(
  File "/home/hdante/Trabalho/LineA/local/lib/python3.10/site-packages/pandas/io/parquet.py", line 102, in _get_path_or_handle
    handles = get_handle(
  File "/home/hdante/Trabalho/LineA/local/lib/python3.10/site-packages/pandas/io/common.py", line 865, in get_handle
    handle = open(handle, ioargs.mode)
FileNotFoundError: [Errno 2] No such file or directory: 'objectTable_tract_3635_DC2_2_2i_runs_DP0_2_v23_0_1_PREOPS-905_step3_12_20220218T172932Z.pq'

@gschwend
Copy link
Member Author

gschwend commented May 3, 2023

Yes, I am going to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants