Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [BUG] - dataframe sort by date column seems broken #162

Open
yulevern opened this issue Aug 7, 2023 · 1 comment
Open

🐛 [BUG] - dataframe sort by date column seems broken #162

yulevern opened this issue Aug 7, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@yulevern
Copy link

yulevern commented Aug 7, 2023

Description

Hi, I passed a dataframe into dataframe_explorer, in the UI when I try to sort by date columns it raise a warning which indicates a problem in the source code, and in the UI the table is not sorted correctly for the date columns.

    filtered_df = dataframe_explorer(df, case=False)
    col_config={
        "DATE_1": st.column_config.TimeColumn(format="YYYY-MM-DD"),
        "DATE_2": st.column_config.TimeColumn(format="YYYY-MM-DD")
    }
    st.dataframe(filtered_df, use_container_width=True, column_config=col_config)
lib/python3.10/site-packages/streamlit_extras/dataframe_explorer/__init__.py:34: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.
  df[col] = pd.to_datetime(df[col])
image

Version of streamlit

1.25.0

Version of streamlit-extras

0.3.0

@yulevern yulevern added the bug Something isn't working label Aug 7, 2023
@arnaudmiribel arnaudmiribel self-assigned this Jul 31, 2024
@arnaudmiribel
Copy link
Owner

@yulevern would you mind sharing a reproducible code example with sample data? I can't reproduce your issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants