{ "cells": [ { "cell_type": "markdown", "id": "67a39f6a", "metadata": {}, "source": [ "# Podcast Catalogue\n", "\n", "Starter notebook for the Kaggle dataset in this folder. It loads `podcasts.csv` with pandas and walks through quality checks and a first piece of analysis.\n", "\n", "**Files:** `podcasts.csv`, `data_dictionary.csv`." ] }, { "cell_type": "markdown", "id": "0000f7f2", "metadata": {}, "source": [ "## 1. Load the data" ] }, { "cell_type": "code", "id": "ca142532", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "import pandas as pd\n", "\n", "df = pd.read_csv(\"podcasts.csv\", low_memory=False)\n", "print(df.shape)" ] }, { "cell_type": "markdown", "id": "325de123", "metadata": {}, "source": [ "## 2. Shape, types and missing values" ] }, { "cell_type": "code", "id": "6eb42bc8", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "print(f\"{df.shape[0]:,} rows x {df.shape[1]} columns\")\n", "\n", "missing = df.isna().mean().mul(100).sort_values(ascending=False)\n", "missing[missing > 0].round(1).to_frame(\"missing_%\").head(15)" ] }, { "cell_type": "markdown", "id": "f2d963fe", "metadata": {}, "source": [ "## 3. Numeric summary" ] }, { "cell_type": "code", "id": "aa2f8fd4", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df.describe(include='number').T.round(2).head(20)" ] }, { "cell_type": "markdown", "id": "5d522582", "metadata": {}, "source": [ "## 4. Podcasts by primary genre" ] }, { "cell_type": "code", "id": "36b914f8", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"primary_genre\"].value_counts().head(15).to_frame(\"podcasts\")" ] }, { "cell_type": "markdown", "id": "5acef9aa", "metadata": {}, "source": [ "## 5. Episode counts" ] }, { "cell_type": "code", "id": "92cc1ece", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"track_count\"].dropna().clip(upper=1000).hist(bins=50, figsize=(8, 4))" ] }, { "cell_type": "markdown", "id": "84786dad", "metadata": {}, "source": [ "## 6. Free vs paid" ] }, { "cell_type": "code", "id": "201a9e41", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"is_free\"].value_counts(normalize=True).mul(100).round(1)" ] }, { "cell_type": "markdown", "id": "ccd82082", "metadata": {}, "source": [ "## 7. Episodes per year" ] }, { "cell_type": "code", "id": "bcc24402", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"episodes_per_year\"].dropna().clip(upper=500).hist(bins=40, figsize=(8, 4))" ] }, { "cell_type": "markdown", "id": "f1bb681b", "metadata": {}, "source": [ "## 8. Release recency" ] }, { "cell_type": "code", "id": "712c5aa4", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"release_year\"].value_counts().sort_index().tail(12).plot(kind=\"bar\", figsize=(9, 4))" ] }, { "cell_type": "markdown", "id": "6e43770c", "metadata": {}, "source": [ "## Next steps\n", "\n", "See `KAGGLE.md` for analysis ideas, caveats and provenance." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python", "version": "3.11", "mimetype": "text/x-python", "file_extension": ".py", "codemirror_mode": { "name": "ipython", "version": 3 }, "pygments_lexer": "ipython3", "nbconvert_exporter": "python" } }, "nbformat": 4, "nbformat_minor": 5 }