User Experience

class statwrap.ux.DataUploadWidget(**kwargs: Any)

A widget for uploading data files and creating a pandas DataFrame.

uploader

Widget for file upload.

Type:

widgets.FileUpload

submit_button

Button to submit the file upload and create the DataFrame.

Type:

widgets.Button

variable_name

The name of the variable to store the DataFrame in the IPython environment.

Type:

str

Parameters:

variable_name (str, optional) – The name of the variable to store the DataFrame in the IPython environment. Default is ‘df’.

Examples

Single DataFrame Usage:
>>> uploader = DataUploadWidget("df")
Multiple DataFrame Usage:
>>> uploader1 = DataUploadWidget("df1")
>>> uploader2 = DataUploadWidget("df2")
Delayed Output Usage:
>>> output = widgets.Output()
>>> with output:
>>>     uploader = DataUploadWidget('df3', auto_display=False)
>>> display(output)
>>> display(uploader)