{
  "source_file": "0930",
  "source_platform": "个人博客",
  "author": "Jay Alammar",
  "title_listed": "Visualizing Pandas' Pivoting and Reshaping Functions",
  "keywords": "Pandas,数据透视,重塑",
  "domain": "数据处理",
  "content_type": "图解教程",
  "is_paid_flag": "否",
  "url": "https://jalammar.github.io/visualizing-pandas-pivoting-and-reshaping/",
  "publish_date": "2018-12",
  "corpus_stage": "数据处理",
  "notes": "Pandas数据透视与重塑可视化",
  "id": "da618c8d6723",
  "collected_at": "2026-10-02T14:22:18",
  "title": "Visualizing Pandas' Pivoting and Reshaping Functions – Jay Alammar – Visualizing machine learning one concept at a time.",
  "body_markdown": "Visualizing Pandas' Pivoting and Reshaping Functions\nYour browser does not support the video tag.\nI love using python’s\nPandas\npackage for data analysis. The\n10 Minutes to pandas\nis a great place to start learning how to use it for data analysis.\nThings get a lot more interesting once you’re comfortable with the fundamentals and start with\nReshaping and Pivot Tables\n. That guide shows some of the more interesting functions of reshaping data. Below are some visualizations to go along with the Pandas reshaping guide.\nPivot\n(Thanks to\n/u/Xylon-\nfor the correction)\nMelt\nStack\nUnstack\nExample #1 – without a parameter\nExample #2\nExample #3\nWritten on April 30, 2018",
  "metadata": {
    "title": "Visualizing Pandas' Pivoting and Reshaping Functions – Jay Alammar – Visualizing machine learning one concept at a time.",
    "description": "Your browser does not support the video tag.\n\n\nI love using python’s Pandas package for data analysis. The 10 Minutes to pandas is a great place to start learning how to use it for data analysis.\n\nThings get a lot more interesting once you’re comfortable with the fundamentals and start with Reshaping and Pivot Tables. That guide shows some of the more interesting functions of reshaping data. Below are some visualizations to go along with the Pandas reshaping guide.",
    "keywords": null,
    "author": "Jay Alammar",
    "og:description": "Your browser does not support the video tag.\n\n\nI love using python’s Pandas package for data analysis. The 10 Minutes to pandas is a great place to start learning how to use it for data analysis.\n\nThings get a lot more interesting once you’re comfortable with the fundamentals and start with Reshaping and Pivot Tables. That guide shows some of the more interesting functions of reshaping data. Below are some visualizations to go along with the Pandas reshaping guide.",
    "og:title": "Visualizing Pandas' Pivoting and Reshaping Functions"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 200,
    "error": ""
  },
  "code_blocks": [],
  "images": [
    {
      "status": "ok",
      "url": "https://jalammar.github.io/images/pandas_pivot.png",
      "bytes": 52132,
      "reused": false,
      "local_path": "attachments/da618c8d6723/images/body-5c994b3b72b39e8d614c.png",
      "src": "https://jalammar.github.io/images/pandas_pivot.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://jalammar.github.io/images/pandas_melt.png",
      "bytes": 52900,
      "reused": false,
      "local_path": "attachments/da618c8d6723/images/body-9b33ef179beda9f1985d.png",
      "src": "https://jalammar.github.io/images/pandas_melt.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://jalammar.github.io/images/pandas_stack.png",
      "bytes": 54479,
      "reused": false,
      "local_path": "attachments/da618c8d6723/images/body-c9c2d6ea84bd70c4fd01.png",
      "src": "https://jalammar.github.io/images/pandas_stack.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://jalammar.github.io/images/pandas_unstack.png",
      "bytes": 53895,
      "reused": false,
      "local_path": "attachments/da618c8d6723/images/body-1f13044104e8fd76613d.png",
      "src": "https://jalammar.github.io/images/pandas_unstack.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://jalammar.github.io/images/pandas_unstack_1.png",
      "bytes": 57978,
      "reused": false,
      "local_path": "attachments/da618c8d6723/images/body-e95cf9e9a4d88eb38e9c.png",
      "src": "https://jalammar.github.io/images/pandas_unstack_1.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://jalammar.github.io/images/pandas_unstack_0.png",
      "bytes": 58533,
      "reused": false,
      "local_path": "attachments/da618c8d6723/images/body-95e7f3cd8af73191f5d0.png",
      "src": "https://jalammar.github.io/images/pandas_unstack_0.png",
      "alt": "",
      "downloaded": true
    }
  ],
  "audio": [],
  "videos": [
    {
      "url": "https://jalammar.github.io/images/pandas_reshape_and_pivot.mp4",
      "src": "https://jalammar.github.io/images/pandas_reshape_and_pivot.mp4",
      "status": "ok",
      "kind": "direct_video",
      "bytes": 764281,
      "reused": false,
      "content_type": "video/mp4",
      "valid": true,
      "height": 720,
      "width": 1198,
      "duration": "21.466667",
      "local_path": "attachments/da618c8d6723/videos/repair-97f14d7f7b4d44279cb3.mp4"
    }
  ],
  "links": [
    {
      "href": "https://jalammar.github.io/images/pandas_reshape_and_pivot.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://pandas.pydata.org/",
      "label": "Pandas",
      "type": "a"
    },
    {
      "href": "https://pandas.pydata.org/pandas-docs/stable/10min.html",
      "label": "10 Minutes to pandas",
      "type": "a"
    },
    {
      "href": "https://pandas.pydata.org/pandas-docs/stable/reshaping.html",
      "label": "Reshaping and Pivot Tables",
      "type": "a"
    },
    {
      "href": "https://www.reddit.com/user/Xylon-",
      "label": "/u/Xylon-",
      "type": "a"
    }
  ],
  "repair_version": 2,
  "repaired_at": "2026-10-14T10:52:31Z",
  "source_url": "https://jalammar.github.io/visualizing-pandas-pivoting-and-reshaping/",
  "papers": [],
  "actual_video_files": [],
  "body_chars": 667,
  "expected_body_images": 6,
  "discovery_status": "ok",
  "delivery_status": "ok",
  "missing_reason": "",
  "raw_html": "attachments/da618c8d6723/pages/source.html",
  "local_html": "attachments/da618c8d6723/pages/article.html",
  "body_base_path": "attachments/da618c8d6723/pages/",
  "body_markdown_path": "attachments/da618c8d6723/pages/article.md"
}