Applying automatic fixes for column types to make the dataframe Arrow-compatible

This is the error that I 'm getting when I deploy my app on Streamlit Cloud

Serialization of dataframe to Arrow table was unsuccessful due to: ("Expected bytes, got a 'int' object", 'Conversion failed for column NAME with type object'). Applying automatic fixes for column types to make the dataframe Arrow-compatible.

I need to solve this as soon as possible .

Hi @Ganesh_Neelakanta

It would be helpful to also provide a minimum working example so as to allow the community to reproduce the encountered error.

You can also look into this related forum post python - How to fix StreamlitAPIException: ("Expected bytes, got a 'int' object", 'Conversion failed for column FG% with type object') - Stack Overflow

Hope this helps!

May be this should do!

#! /usr/bin/env python3
import streamlit as st
import pandas as pd

if __name__ == '__main__':
    st.dataframe(pd.DataFrame.from_dict({'a': 1, 'b': 'foobar'}, orient='index'))

How to avoid those warnings, when I know my Df is not meant to have same datatype across all rows?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.