GenerativeAIExamples
GenerativeAIExamples copied to clipboard
Add support for Excel file upload in data-analysis-agent
Summary
This pull request adds support for uploading .xlsx Excel files in addition to .csv in the data-analysis-agent application.
Changes Made
- Modified the
st.file_uploader()line to accept both CSV and Excel files. - Added logic to determine file type and use either
pd.read_csv()orpd.read_excel(). - Added
openpyxltorequirements.txtto support Excel parsing.
Why this is needed
Many data analysts work with Excel files as well as CSV. This enhancement makes the app more accessible and flexible for a broader audience.
Tested
- Verified that both
.csvand.xlsxfiles load properly. - Tested functionality locally with Streamlit.
Let me know if any adjustments or refinements are needed.