Download Files
The files can also be seamlessly downloaded into file system from Python or R blocks.
Download into File system
import requests
# URL of the Iris dataset
url = "https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data"
file_path = "./iris_dataset.csv" # Desired local file path
# Send an HTTP GET request to the URL
response = requests.get(url)
# Check if the request was successful
if response.status_code == 200:
# Open a local file with write-binary ('wb') mode
with open(file_path, 'wb') as file:
# Write the content to the local file
file.write(response.content)
print(f"File downloaded successfully and saved as {file_path}")
else:
print(f"Failed to download the file. HTTP status code: {response.status_code}")
Download from File system

Last updated

