- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2025 09:49 PM
Hey there,
Here’s a simple step-by-step way to load a CSV in Databricks Free Edition:
Step 1: Upload the file to your workspace (not DBFS)
- On the left menu, go to "Workspace".
- Right-click any folder (like Shared or your username) → click "Upload".
- Choose your 2010_summary.csv file and upload it.
This will upload it into the notebook's local directory — not /FileStore.
Step 2: Use the correct path to read it
Once uploaded, the file path will look something like this:
"/Workspace/Users/your-email-or-folder-name/2010_summary.csv"
But Spark doesn’t read from /Workspace. So here’s a better way:
Use Databricks Utilities to access it:
uploaded_path = "dbfs:/tmp/2010_summary.csv"
dbutils.fs.cp("file:/Workspace/Users/your-folder-name/2010_summary.csv", uploaded_path)
Now read it with Spark:
df = spark.read.format("csv").option("header", "false").load(uploaded_path)
df.show(5)