title: How to fix - ArrowInvalid: ("Could not convert (x, y) with type tuple)?
body: <p>I'm trying to build a streamlit app. Below is the working example I'm trying</p>
  <pre><code>from pm4py.objects.conversion.log import converter as log_converter
  import pandas as pd
  import pm4py
  df = pm4py.format_dataframe(pd.read_csv('https://raw.githubusercontent.com/pm4py/pm4py-core/release/notebooks/data/running_example.csv', sep=';'), case_id='case_id',activity_key='activity',
                               timestamp_key='timestamp')
  
  log = log_converter.apply(df)
  </code></pre>
  <pre><code>precedence_dict = pm4py.discover_dfg(log)[0]
  
  </code></pre>
  <p><strong>precedence_dict</strong> is a dict of (antecedent,consequent) and count</p>
  <pre><code>precedence_dict  = {('check ticket', 'decide'): 6,
           ('check ticket', 'examine casually'): 2,
           ('check ticket', 'examine thoroughly'): 1,
           ('decide', 'pay compensation'): 3,
           ('decide', 'reinitiate request'): 3,
           ('decide', 'reject request'): 3,
           ('examine casually', 'check ticket'): 4,
           ('examine casually', 'decide'): 2,
           ('examine thoroughly', 'check ticket'): 2,
           ('examine thoroughly', 'decide'): 1,
           ('register request', 'check ticket'): 2,
           ('register request', 'examine casually'): 3,
           ('register request', 'examine thoroughly'): 1,
           ('reinitiate request', 'check ticket'): 1,
           ('reinitiate request', 'examine casually'): 1,
           ('reinitiate request', 'examine thoroughly'): 1
  }
  </code></pre>
  <p>Converting the above <code>dict</code> to pandas dataframe</p>
  <pre><code>precedence_df = pd.DataFrame.from_dict(precedence_dict, orient='index').reset_index()
  
  
  rename_map = {&quot;index&quot; : &quot;Antecedent,Consequent&quot;, 0 : &quot;Count&quot;}
  precedence_df = precedence_df.rename(columns=rename_map)
  </code></pre>
  <pre><code>precedence_df['Antecedent'], precedence_df['Consequent'] = zip(*precedence_df[&quot;Antecedent,Consequent&quot;])
  # precedence_df.assign(**dict(zip(['Antecedent', 'Consequent'], precedence_df[&quot;Antecedent,Consequent&quot;].str)))
  # precedence_df['Antecedent'], precedence_df['Consequent'] = precedence_df[&quot;Antecedent,Consequent&quot;].str
  precedence_mat = precedence_df[['Antecedent', 'Consequent', 'Count']]
  </code></pre>
  <pre><code>st.dataframe(precedence_df)
  </code></pre>
  <p>I got the ArrowInvalid Error while running the app at this line</p>
  <p>Complete error traceback</p>
  <pre><code>ArrowInvalid: (&quot;Could not convert (x, y) with type tuple: did not recognize Python value type when inferring an Arrow data type&quot;, 'Conversion failed for column Antecedent, Consequent with type object')
  
  Traceback:
  File &quot;C:\Users\zz\Documents\Streamlit\preced\app.py&quot;, line 1353, in &lt;module&gt;
      st.dataframe(precedence_df)
  File &quot;c:\users\zz\anaconda3\lib\site-packages\streamlit\elements\dataframe_selector.py&quot;, line 85, in dataframe
      return self.dg._arrow_dataframe(data, width, height)
  File &quot;c:\users\zz\anaconda3\lib\site-packages\streamlit\elements\arrow.py&quot;, line 82, in _arrow_dataframe
      marshall(proto, data, default_uuid)
  File &quot;c:\users\zz\anaconda3\lib\site-packages\streamlit\elements\arrow.py&quot;, line 160, in marshall
      proto.data = type_util.data_frame_to_bytes(df)
  File &quot;c:\users\zz\anaconda3\lib\site-packages\streamlit\type_util.py&quot;, line 371, in data_frame_to_bytes
      table = pa.Table.from_pandas(df)
  File &quot;pyarrow\table.pxi&quot;, line 1561, in pyarrow.lib.Table.from_pandas
  File &quot;c:\users\zz\anaconda3\lib\site-packages\pyarrow\pandas_compat.py&quot;, line 595, in dataframe_to_arrays
      for c, f in zip(columns_to_convert, convert_fields)]
  File &quot;c:\users\zz\anaconda3\lib\site-packages\pyarrow\pandas_compat.py&quot;, line 595, in &lt;listcomp&gt;
      for c, f in zip(columns_to_convert, convert_fields)]
  File &quot;c:\users\zz\anaconda3\lib\site-packages\pyarrow\pandas_compat.py&quot;, line 581, in convert_column
      raise e
  File &quot;c:\users\zz\anaconda3\lib\site-packages\pyarrow\pandas_compat.py&quot;, line 575, in convert_column
      result = pa.array(col, type=type_, from_pandas=True, safe=safe)
  File &quot;pyarrow\array.pxi&quot;, line 302, in pyarrow.lib.array
  File &quot;pyarrow\array.pxi&quot;, line 83, in pyarrow.lib._ndarray_to_array
  File &quot;pyarrow\error.pxi&quot;, line 99, in pyarrow.lib.check_status
  </code></pre>
  <p>Current pyarrow version 5.0.0.</p>
  <p>I DON'T HAVE ANY ISSUES/ERRORS when I tried to run the same code in colab(expect st.dataframe), I don't have any issues/errors. What does ArrowInavlid Error mean, how to fix this error?</p>