title: Writing Pandas DataFrame to Parquet file?
body: <p>I am reading data in chunks using pandas.read_sql and appending to parquet file
  but get errors</p>
  <p>Using pyarrow.parquet:</p>
  <pre><code>import pyarrow as pa
  import pyarrow.parquet as pq
  for chunk in pd.read_sql_query(query , conn, chunksize=10000):
      table_data = pa.Table.from_pandas(chunk)  #converting df to arrow
      pq.write_table(table=table_data,where=file.paraquet,
                     use_deprecated_int96_timestamps=True,
                     coerce_timestamps='ms',allow_truncated_timestamps=True)
          
  </code></pre>
  <p>Getting the following error:</p>
  <pre><code>  File &quot;pyarrow\_parquet.pyx&quot;, line 1427, in pyarrow._parquet.ParquetWriter.__cinit__
    File &quot;pyarrow\error.pxi&quot;, line 120, in pyarrow.lib.check_status
  pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: duration[ns]
  </code></pre>
  <p>using fast parquet:</p>
  <pre><code>from fastparquet import write
  for chunk in pd.read_sql_query(query , conn, chunksize=10000):
      with open(os.path.join(download_location, file_name+ '.parquet'),mode=&quot;a+&quot;) as f:
          write(filename=f.name,data=chunk,append=True)
  </code></pre>
  <p>Getting following error:</p>
  <pre><code>    raise ValueError(&quot;Can't infer object conversion type: %s&quot; % head)
  ValueError: Can't infer object conversion type: 0    2021-09-06
  </code></pre>
  <p>Is there any solution which converts pandas dataframe to parquet file (append mode)
  without datetime columns issue?</p>