Skip to main content

Command Palette

Search for a command to run...

🔧 Project: Predict Titanic Survivors using Microsoft Fabric

Updated
3 min readView as Markdown

🚀 Project Overview

In this beginner-friendly machine learning project, we're using Microsoft Fabric to analyze the Titanic passenger dataset and build a predictive model that determines whether a passenger survived the disaster.

We’ll go step-by-step using Lakehouse, Notebooks, and PySpark (Python) — all inside Microsoft Fabric’s unified data platform.

Lakehouse

A Lakehouse in Azure Fabric gives you a single platform to store, process, and analyze both raw and structured data, making it ideal for modern data science and analytics projects.

✅ Traditional Approach (Before Lakehouse)

🔹 Data Lake🔹 Data Warehouse
Stores raw, unstructured dataStores cleaned, structured data
Cheap, flexible, scalableOptimized for fast queries (BI)
Used by data scientists/engineersUsed by analysts and BI teams
Examples: Azure Data Lake Gen2Examples: Azure Synapse SQL pool

➡️ Problem: These were separate systems. You had to move data from the lake to the warehouse for reporting, which caused duplication, delay, and complexity.

✅ Unified Storage in Microsoft Fabric (Lakehouse)

Now with OneLake in Microsoft Fabric:

  • You store all your data in one place — no need to move between lake and warehouse.

  • The same data can be:

    • Accessed as files (CSV, Parquet) → for ML/AI

    • Queried as structured tables → for Power BI/SQL

🧠 Example:

Imagine you upload titanic.csv to the Lakehouse:

  • In Files: It exists as a raw file (data lake style)

  • When you Load to Table: It becomes a structured table (warehouse style)

  • Power BI, SQL, and notebooks all use the same storage location (OneLake)

Files

Tables

🔄 Summary:

“Unified storage” means you don’t need separate systems for storage (lake) and analytics (warehouse). With OneLake, your data serves both data science and business intelligence directly — faster, simpler, and cheaper.

  1. Create a new Lakehouse

  • Go to My Workspace

  • Click + New item → Lakehouse

  • Name it Titanic_Lakehouse

  1. Upload the dataset

  1. Convert the file into a structured table

  • After the file uploads, right-click on titanic.csv

  • Choose Load to Tables → New table

  • Name the new table titanic and click Load

  1. Open a Notebook

  • At the top menu, click Open notebook → New notebook

  • Make sure the notebook is attached to Titanic_Lakehouse

  • Read the dataset using PySpark

    • Run this code:

        df = spark.read.table('titanic')
        display(df.limit(5))
      

  • Print Schema

EndFragment

More from this blog

Data Science

39 posts