CSV file as input?
Is there a way to input using FileDrop (or any other way) a CSV file and use it?
4 Replies
Does this example work for you? https://solara.dev/documentation/components/input/file_drop#arguments_1
Link to source code: https://github.com/widgetti/solara/blob/master/solara/website/pages/documentation/components/input/file_drop.py
It should show how to upload a csv and run a function on the contents
GitHub
solara/solara/website/pages/documentation/components/input/file_dro...
A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps - widgetti/solara
It works for me, does it still not work for you?
Works for me. Is is necessary to load full file and use BytesIO
Hi, maybe related to this.
I was struggling to read .csv to a Pandas dataframe by using file drop. Eventually could read the .csv like this (using file_obj and data from file drop with Lazy=False):
Apparently needed to make a string from the data and then read by using StringIO. Worked for me. In this example df is a reactive variable dataframe.