st.dataframe does not handle StringDtype in Pandas >= 1.0.0
See original GitHub issueSummary
Displaying a DataFrame with a ‘string’ or StringArray dtype column fails with a NotImplementedError. This dtype is new in Pandas 1.0.0.
Steps to reproduce
Run this app:
import pandas as pd
import streamlit as st
st.header('DataFrame with StringDtype')
df = pd.DataFrame({
'a': pd.Series('we are the knights who say ni'.split(), dtype='string'),
})
st.dataframe(df)
Debug info
- Streamlit version: 0.54.0
- Python version: 3.7.6
- Pandas version: 1.0.0
- Using Pipenv
- OS version: MacOS 10.15.3
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
"AttributeError: module 'pandas' has no attribute 'StringDtype ...
StringDtype is implemented in pandas 1.0.0+:. class pandas.StringDtype. Extension dtype for string data. New in version 1.0.0.
Read more >st.dataframe - Streamlit Docs
The data to display. If 'data' is a pandas.Styler, it will be used to style its underlying DataFrame. Streamlit supports custom cell values...
Read more >IO tools (text, CSV, HDF5, …) — pandas 1.5.2 documentation
To ensure no mixed types either set False , or specify the type with the dtype parameter. Note that the entire file is...
Read more >pandas: powerful Python data analysis toolkit - PyData |
DataFrames with nullable integer, the new string dtype and period data type ... Bug in Float64Index.astype() where np.inf was not handled ...
Read more >What's new in 1.3.0 (July 2, 2021) - Pandas
When reading from a remote URL that is not handled by fsspec (e.g. HTTP and ... type of the Series or columns of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jrhone labelling this as an “enhancement” might not be strong enough. These new dtypes are the preferred dtypes for people using pandas 1. Not to support them out of the box looks like a bug to me.
@JohnReid Point taken.
We use labels to manage our work pipelines, but every once in a while an issue like this one sort of defines clean classification. Regardless, I think there’s a strong case for prioritizing this one. Thanks for the bump!