read file from local machine(my computer) and create a dataframe

khaansaab
New Contributor II

I want to create a notebook and add a widget which will allow the user to select a file from local machine(my computer) and read the contents of the file and create a dataframe. is it possible? and how? in dbutils.widgets i dont have any options for file uploading or file reading. is there an alternate way? please help.

szymon_dybczak
Esteemed Contributor III

Hi @khaansaab ,

Currently, there is now out of the box mechanism that will allow you to that. As a workaround,you can create a UC volume and tell your users to upload files into that volume. Then you can create notebook that will have file_name parameter and based on that parameter it will load file to a dataframe from that volume.

View solution in original post