Files
Store, use and download files in a project.
Each project has a file system for the files it needs: data, reference documents, models and code. Open the files sidebar with Ctrl+1 or ⌘+1 in the notebook view, or Ctrl+2 or ⌘+2 in the canvas view.
Uploading and using files
Upload files from the files sidebar. Your code can then read them by their path, as on your own computer.
You can also import .py files from the file system as modules in your blocks.
Saving files from code
Code can write files to the file system. For example, to download a file from the web in Python:
import requests
url = "https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data"
file_path = "./iris_dataset.csv"
response = requests.get(url)
if response.status_code == 200:
with open(file_path, "wb") as file:
file.write(response.content)Or in R:
url <- "https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data"
download.file(url, "./iris_dataset.csv", method = "auto")Downloading and deleting files
Download any file to your computer from the files sidebar, or delete files you no longer need.
Larger data
For large or shared datasets, use a data connection instead of uploading files.
Last updated
Was this helpful?
