To work with data, you can add files from your file system or from an external URL source.
Quick file upload
This is the quickest way to add a file to your notebook and start using it in the code:
Drag a file from your file system and drop it anywhere in the editor.
- To refer to the file in your code, use the file name.
For example, the code below uses a file called 'libraries_by_python_version.csv'.libraries = pd.read_csv('libraries_by_python_version.csv') libraries
Use previously uploaded data
To access the data of already uploaded notebook attachments or workspace files, do the following:
- Go to Attached data icon on the left-hand sidebar. You can see two categories of attached files there:
or click the
Notebook files: lists the attachments of the opened notebook. These files can only be used in the notebook.
Workspace files: lists the files of the associated workspace. These files can be attached to any notebook from this workspace.
Click the category you want to use to expand the list and see the attached files.
(Optional) If you are working from the default Home workspace, you must explicitly provide access to its files. Click Attach workspace files to view the attachments and use the data in the notebook.
Right-click the file you want to use in the code and select Copy path to clipboard.
Paste the copied path into your code.