title: Error when trying to write Pandas Dataframe to Parquet file
body: <p>I am trying to write a pandas Dataframe to a Parquet file.</p>
  <p>Whenever i do this i get the following error:</p>
  <pre><code>pyarrow.lib.ArrowInvalid: (&quot;Could not convert ' 10188018' with type str: tried to convert to int64&quot;, 'Conversion failed for column 1064 TEC serial with type object')
  </code></pre>
  <p>I have tried looking online and found some that had close to the same problem.
  Other solutions that did not help:
  <a href="https://discuss.streamlit.io/t/after-upgrade-to-the-latest-version-now-this-error-id-showing-up-arrowinvalid/15794" rel="nofollow noreferrer">https://discuss.streamlit.io/t/after-upgrade-to-the-latest-version-now-this-error-id-showing-up-arrowinvalid/15794</a>
  Tried to downgrade to streamlit 0.84.2
  tried to change the config file tried to run the program like:</p>
  <pre><code>streamlit run app.py --global.dataFrameSerialization=&quot;legacy&quot;
  </code></pre>
  <p>I also found the solution:
  <a href="https://stackoverflow.com/questions/67502942/arrowtypeerror-did-not-pass-numpy-dtype-object-conversion-failed-for-column">ArrowTypeError: Did not pass numpy.dtype object&#39;, &#39;Conversion failed for column X with type int32</a></p>
  <p>Did not work to downgrade or upgrade numpy</p>
  <p>My code:</p>
  <pre><code>def saveAsParquet():
      print(&quot;Save as parquet&quot;)
      directory = askdirectory()
      directory = directory + &quot;/&quot;
      print(directory)
      for x in range (0,len(dataFrames)):
          filenameP = directory + fileNames[x] + &quot;.parquet&quot;
          filenameE = directory + fileNames[x] + &quot;.xlsx&quot;
          print(filenameP)
          print(filenameE)
          #dataFrames[x].dtypes.astype(str)
          dataFrames[x].to_parquet(path=filenameP,enige=&quot;fastparquet&quot;, compression=&quot;None&quot;)
          dataFrames[x].to_excel(&quot;C:\LogFIleCutter\LogfileTest.xlsx&quot;)
          print(&quot;Files exported&quot;)
  </code></pre>
  <p>I also tried the solution of turning the column in two string using the dtypes.astype(str)</p>
  <p>Versions of stuff:</p>
  <pre><code>(base) C:\Windows\system32&gt;pip show numpy
  WARNING: Ignoring invalid distribution -ndas (c:\programdata\anaconda3\lib\site-packages)
  WARNING: Ignoring invalid distribution -umpy (c:\programdata\anaconda3\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\programdata\anaconda3\lib\site-packages)
  WARNING: Ignoring invalid distribution -andas (c:\programdata\anaconda3\lib\site-packages)
  Name: numpy
  Version: 1.19.0
  Summary: NumPy is the fundamental package for array computing with Python.
  Home-page: https://www.numpy.org
  Author: Travis E. Oliphant et al.
  Author-email:
  License: BSD
  Location: c:\programdata\anaconda3\lib\site-packages
  Requires:
  Required-by: tifffile, tables, streamlit, statsmodels, seaborn, scipy, scikit-learn, scikit-image, PyWavelets, pyerfa, pydeck, pyarrow, patsy, pandas, numexpr, numba, mkl-random, mkl-fft, matplotlib, imageio, imagecodecs, h5py, fastparquet, daal4py, Bottleneck, bokeh, bkcharts, astropy, altair
  </code></pre>
  <pre><code>(base) C:\Windows\system32&gt;streamlit version
  Streamlit, version 0.84.2
  </code></pre>