Hey there, great job on now having the
accept_multiple_files flag for
file_uploader. However, I am having an issue when I want to upload multiple CSV files, and then concatenate these files into one
uploaded_files = st.file_uploader("Upload CSV", type="csv", accept_multiple_files=True) if uploaded_files: uploaded_data_read = [pd.read_csv(file) for file in uploaded_files] raw_data = pd.concat(uploaded_data_read)
EmptyDataError: No columns to parse from file
for the line
[pd.read_csv(file) for file in uploaded_files].
I don’t get issues when I upload one file, only when I upload more than one file.
Here is the output of
st.write(uploaded_files) after uploading two files
[ "<class 'streamlit.uploaded_file_manager.UploadedFile'>", "<class 'streamlit.uploaded_file_manager.UploadedFile'>" ]
Can anyone help?