TomAugspurger commented on PR #51151:
URL: https://github.com/apache/arrow/pull/51151#issuecomment-6084791916

   FYI @jorisvandenbossche, this did cause a behavior change in pandas when 
reading zero columns. With pyarrow==25.x, that returned a `(0, 0)` shape 
dataframe. With pyarrow==26, it returns a `(nrows, 0)` shape dataframe
   
   ```python
   import io
   
   import pandas as pd
   
   df = pd.DataFrame({"a": [1, 2, 3]})
   b = io.BytesIO()
   df.to_parquet(b)
   empty = pd.read_parquet(b, columns=[])
   print(empty.shape)  # (0, 0) for pyarrow=25.x; (3, 0) for pyarrow=26.x
   ```
   
   I think that `(nrows, 0)` is the shape I'd expect, but leaving a note here 
in case anyone else stumbles across this (xref 
https://github.com/NVIDIA/cudf/pull/24520).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to