I am working on a mini project wherein I ask the users to upload a CSV file. I performed some basic EDA and visuals, I also made use of the Pandas Profiling in order to generate the profile report. I want to create a download button which on clicking allows the users to download the profile report.
The code I have tried is :
if dataset is not None: df = pd.read_csv(dataset , delimiter = ",") st.dataframe(df) pr = df.profile_report() st_profile_report(pr) export=pr.to_file(b"Analysis.html") st.download_button(label="Download Full Report", data=export,file_name='Profile Report')
Sadly I don’t find this working ( I am using Streamlit version 1.2.0). Requesting help from the community to find a workaround to achieve the above.
Thanks in advance.