Skip to content

st.data_editor hide_index=True is not hiding index column in version v1.30.0 and above when pd.DataFrame as input #8263

@jjur

Description

@jjur

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

After upgrading to version 1.30.0, an index column started to appear in st.data_editor, even though I used the parameter hide_index=True to keep it hidden. Attaching code to reproduce. It is working fine on versions v1.29.0 and below.

Reproducible Code Example

Open in Streamlit Cloud

import streamlit as st
import pandas as pd

data = pd.read_json('{"Foo":{},"Bar":{},"FooBar":{}}')

st.data_editor(data = data,
    hide_index=True,
    num_rows='dynamic'
    )

Steps To Reproduce

No response

Expected Behavior

image

Current Behavior

image
Note the first column that appeared and requires user input

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.32.0
  • Python version: 3.10.9
  • Operating System: Windows and Linux
  • Browser: MS Edge

Additional Information

https://docs.streamlit.io/library/api-reference/data/st.data_editor

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.data_editorRelated to the `st.data_editor` widgettype:enhancementRequests for feature enhancements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions