Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2021 12:31 PM
With code for anyone facing the same issue, and without moving to a different path
import requests
CHUNK_SIZE=4096
with requests.get("https://raw.githubusercontent.com/suy1968/Adult.csv-Dataset/main/adult.csv", stream=True) as resp:
if resp.ok:
with open("/dbfs/FileStore/data/adult.csv", "wb") as f:
for chunk in resp.iter_content(chunk_size=CHUNK_SIZE):
f.write(chunk)
display(spark.read.csv("dbfs:/FileStore/data/adult.csv", header=True, inferSchema=True))I had to use a different URL as the one in the original question was no longer available