Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Netflix Data Cleaning & Exploratory Analysis Pipeline

An end-to-end Python data pipeline built with Pandas to ingest, audit, clean, and analyze raw Netflix title data directly from the web.

Project Overview

Raw real-world data is often messy, unstructured, and incomplete. This repository demonstrates a production-style data cleaning workflow on raw Netflix title data (~7,800 records).

Instead of ad-hoc script execution, the project uses a modular pipeline architecture with reusable Python functions to clean missing data, standardize data types, extract temporal features, parse compound duration fields, and execute parameterized analysis.


Key Features & Modular Functions

Data Cleaning & Preprocessing

  • handle_missing_values(df): Imputes missing values in high-cardinality categorical text columns (director, cast, country) with 'Unknown' to retain dataset volume while safely dropping incomplete metadata rows (date_added, rating).
  • fix_datatypes_and_features(df): Trims whitespace, casts text dates into pandas datetime64[ns] objects, and extracts added_year and added_month for temporal analysis.
  • process_duration(df): Parses mixed text fields (e.g., "90 min", "3 Seasons") into distinct numerical columns (duration_min for Movies, seasons for TV Shows).
  • clean_netflix_pipeline(df): Master wrapper that ties all preprocessing steps into a single executable pipeline.

Single-Input Analysis Toolkit

  • get_country_stats(country_name): Returns volume, title type breakdowns, and top genres for any country.
  • get_director_profile(director_name): Queries all titles, ratings, and runtimes for a given director.
  • get_yearly_additions(year): Analyzes platform acquisition trends for a given calendar year.
  • search_by_genre(genre): Filters titles by genre keyword and calculates average movie runtime metrics.

Project Structure

├── netflix_pipeline.ipynb   # Complete Google Colab Notebook with cleaning & analysis runner
├── netflix_cleaned.csv      # Exported production-ready cleaned dataset
└── README.md                # Project documentation


Key Insights from Analysis

  • Average Movie Runtime: ~99.3 minutes.
  • Max TV Series Seasons: 16 seasons.
  • Top Production Hubs: The United States and India lead in total titles available.
  • Content Peak: 2018 saw a major influx of new additions (~1,684 titles added in a single year).

Quick Start / Usage

Prerequisites

  • Python 3.8+
  • pandas
  • numpy

Running the Notebook

  1. Clone this repository:
git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
  1. Open netflix_pipeline.ipynb in Google Colab or Jupyter Notebook.
  2. Execute cells sequentially to pull the raw data, run the master pipeline, and test the analysis toolkit!

About

This notebook cleans and analyzes Netflix titles data. It covers missing value handling, data type correction, temporal feature extraction, and content duration processing. It performs exploratory data analysis of Netflix content by country, director, and genre. Key topics: Data Cleaning, Feature Engineering, EDA, Pandas, Data Visualization.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages