When I executed the following script
import streamlit as st import pandas as pd df = pd.read.csv('path\to\a random.csv') df_types = pd.DataFrame(df.dtypes, columns=['Data Type'])
where my csv file had 3 columns: Text (object), Date-Time (object), Number (float64).
However, I got this error message
StreamlitAPIException: Unable to convert numpy.dtype to pyarrow.DataType. This is likely due to a bug in Arrow (see https://issues.apache.org/jira/browse/ARROW-14087). As a temporary workaround, you can convert the DataFrame cells to strings with df.astype(str).
Could someone please explain why:
- df_types is a dataframe but why it couldn’t be displayed?
- what numpy.dtype did the error message refer to?
- why was numpy.dtype needed to convert to pyarrow.DataType?
Thanks in advance