How to apply row spannin in my dataframe?

:rotating_light: Before clicking “Create Topic”, please make sure your post includes the following information (otherwise, the post will be locked). :rotating_light:

  1. Are you running your app locally or is it deployed?
  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform?
    b. Share the link to the public deployed app.
  3. Share the link to your app’s public GitHub repository (including a requirements file).
  4. Share the full text of the error message (not a screenshot).
  5. Share the Streamlit and Python versions.

hi.

I try making simply dataframe display app.

I made dataset and basic output.
but my team want some change form, they want row spanning in some columns.

some guy told me, “set index making automatically row spanning in dataframe”.
I try it, but I can’t apply it. becuase when I use multiindex, it seperate between header columns.

who teach me a make row spanning in dataframe or how to set index name position same as header columns.

thank you!

set index - datamframe
image

convert html
image

** I want this!!
image

Hi @Desert_Candle

I think what you want is to use reset_index() on your dataframe, which will convert an index column as a column.

You can do the following:

df.reset_index()

And if you want to have this replace the current dataframe then use:

df.reset_index(inplace=True)

Hope this helps!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.