title: How to save a pandas dataframe when a column contains sets
body: <p>When trying to save a pandas dataframe where a column contains set (see example below)</p>
  <pre class="lang-py prettyprint-override"><code>import pandas as pd
  
  df = pd.DataFrame({&quot;col_set&quot;: [{&quot;A&quot;, &quot;B&quot;, &quot;C&quot;}, {&quot;D&quot;, &quot;E&quot;, &quot;F&quot;}]})
  df.to_parquet(&quot;df_w_col_set.parquet&quot;)
  </code></pre>
  <p>The following error is thrown:</p>
  <pre><code>ArrowInvalid: (&quot;Could not convert {'C', 'B', 'A'} with type set: did not recognize Python value type when inferring an Arrow data type&quot;, 'Conversion failed for column col_set with type object')
  </code></pre>
  <p>How can one save this kind of dataframe and avoid the error above?</p>
  <p>Some semi related posts mention providing a yarrow schema but I'm not clear on what type to use when consulting <a href="https://arrow.apache.org/docs/python/api/datatypes.html" rel="nofollow noreferrer">pyarrow datatypes</a>.</p>
  <p>Code was run with <code>python 3.7.4</code>, <code>pandas==1.3.0</code> and  <code>pyarrow==3.0.0</code></p>
  <p>Mainly looking for a solution where upgrades are not needed or really minimized(to avoid breaking other dependencies).</p>