question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

st.dataframe does not handle StringDtype in Pandas >= 1.0.0

See original GitHub issue

Summary

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:closed
  • Created 4 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
JohnReidcommented, Jul 23, 2020

@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.

1reaction
nthmostcommented, Jul 25, 2020

@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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found