wukan1986 commented on issue #12458:
URL: https://github.com/apache/arrow/issues/12458#issuecomment-1043815076


   I found that,  first file is not empty dataframe, it is work.
   
   ```python
   import pandas as pd
   import pyarrow as pa
   
   print(pd.__version__)  # 1.4.1
   print(pa.__version__)  # 7.0.0
   
   dr = pd.date_range(start='2022-01-01', end='2022-01-10', freq='D')
   df = pd.DataFrame(index=dr)
   df['A'] = pd.to_datetime('today')
   df['B'] = 1.0
   df['C'] = 'a'
   df['D'] = 2
   
   df.head(1).to_parquet('b/0.parquet')  # not empty dateframe
   df.head(0).to_parquet('b/1.parquet')  # empty dateframe
   df.head(0).to_parquet('b/2.parquet')  # empty dateframe
   df.to_parquet('b/3.parquet')
   pd.read_parquet('b')
   ```
   


-- 
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