{ "cells": [ { "cell_type": "markdown", "id": "9cc9eb99", "metadata": {}, "source": [ "# Steam Games Market\n", "\n", "Starter notebook for the Kaggle dataset in this folder. It loads `steam_games.csv` with pandas and walks through quality checks and a first piece of analysis.\n", "\n", "**Files:** `steam_games.csv`, `data_dictionary.csv`." ] }, { "cell_type": "markdown", "id": "0000f7f2", "metadata": {}, "source": [ "## 1. Load the data" ] }, { "cell_type": "code", "id": "bf388b94", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "import pandas as pd\n", "\n", "df = pd.read_csv(\"steam_games.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": "6cb487e3", "metadata": {}, "source": [ "## 4. Price distribution" ] }, { "cell_type": "code", "id": "a6eee582", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"price_usd\"].dropna().clip(upper=80).plot(\n", " kind=\"hist\", bins=40, figsize=(10, 4), title=\"Price distribution (clipped at $80)\")" ] }, { "cell_type": "markdown", "id": "c70c8b50", "metadata": {}, "source": [ "## 5. Free vs paid" ] }, { "cell_type": "code", "id": "fc365c5a", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df.groupby(\"is_free\")[[\"owners_mid\", \"total_reviews\", \"ccu\"]].median().round(1)" ] }, { "cell_type": "markdown", "id": "0c6ffb32", "metadata": {}, "source": [ "## 6. Biggest games by estimated owners" ] }, { "cell_type": "code", "id": "cc06b939", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df.nlargest(15, \"owners_mid\")[[\"name\", \"developer\", \"owners_mid\", \"review_ratio_pct\", \"price_usd\"]]" ] }, { "cell_type": "markdown", "id": "2b83ad73", "metadata": {}, "source": [ "## 7. Review ratio vs price band" ] }, { "cell_type": "code", "id": "29846232", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df.groupby(\"price_band\")[\"review_ratio_pct\"].agg([\"count\", \"median\"]).round(1)" ] }, { "cell_type": "markdown", "id": "b4a1270a", "metadata": {}, "source": [ "## 8. Engagement: median vs average playtime" ] }, { "cell_type": "code", "id": "3daeeaeb", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "sub = df.dropna(subset=[\"median_playtime_hours\", \"average_playtime_hours\"]).query(\"average_playtime_hours < 200\")\n", "sub.plot.scatter(x=\"average_playtime_hours\", y=\"median_playtime_hours\", s=5, alpha=0.3, figsize=(8, 5))" ] }, { "cell_type": "markdown", "id": "7228780b", "metadata": {}, "source": [ "## 9. Top publishers by title count" ] }, { "cell_type": "code", "id": "ac4cbf46", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"publisher\"].value_counts().head(15).to_frame(\"titles\")" ] }, { "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 }