Having column issues when importing a .csv file for st.dataframe

I’m trying to import a small .csv file but it imports everything into one column:

here is the ‘app’:

df = pd.read_csv(r'/home/mike/avg111.csv', sep='comma', header=0)
st.dataframe(df, use_container_width=True)

I tried playing around with a few parameters,
originally, they were: sep=‘delimeter’, header=none

Does Streamlit have the ability to separate out the columns?
I’m following instructions here Dataframes - Streamlit Docs but did not see how to do this.

It’s a pretty simple .cvs of 7 columns and 46 rows, all numbers.


  1. running locally
  2. app is not deployed:
  3. app not on Github yet (locally only)
  4. Python 3.10.13, Streamlit 1.28.1

The parameter sep='comma' is wrong, leave it out, as , is the default separator for pandas.read_csv method:


:thinking: I thought I tried that first and didn’t work, so I found the extra parameters somewhere in the Streamlit docs and added them.

In any case, I deleted them and it works:


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