{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# pandas 100제 실습 노트북\n",
    "\n",
    "위퀴즈 북스 「pandas 100제: 판다스 연습문제와 풀이」의 실습용 노트북입니다.\n",
    "\n",
    "1. 장마다 **준비 코드** 셀을 먼저 실행하세요 (Shift+Enter).\n",
    "2. 문제 아래 빈 셀에 코드를 써서 실행합니다. 같은 장의 문제는 번호 순서대로 이어집니다.\n",
    "3. 막히면 책의 힌트와 정답을 펼쳐 보세요: https://wequiz.org/books/pandas-100-exercises/\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 091–100 실전 종합\n",
    "\n",
    "해설·힌트·정답: https://wequiz.org/books/pandas-100-exercises/pandas-100-091-practice/"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**준비 코드** — 이 셀을 먼저 실행하세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "df = pd.DataFrame({\n",
    "    'name': ['김민준', '이서연', '박지호', '최수아', '정민서', '강도윤', '윤하은', '임시우'],\n",
    "    'class': ['A', 'B', 'A', 'C', 'B', 'C', 'A', 'B'],\n",
    "    'kor': [85, 92, 58, 77, 66, 90, 73, 81],\n",
    "    'eng': [78, 88, 64, 95, 59, 70, 82, 91],\n",
    "    'math': [92, 75, 49, 88, 71, 66, 95, 60],\n",
    "})\n",
    "df['total'] = df['kor'] + df['eng'] + df['math']\n",
    "\n",
    "daily = pd.DataFrame({\n",
    "    'date': pd.date_range('2026-03-01', periods=7, freq='D'),\n",
    "    'visitors': [120, 135, 128, 160, 155, 210, 198],\n",
    "})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 091. 구간 나누기\n",
    "\n",
    "0~300점의 정수인 합계를 `0~199`, `200~239`, `240~300` 세 구간(`C`, `B`, `A`)으로 나눈 `grade` 열을 만드세요. 0점도 C에 포함하세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 여기에 코드를 쓰고 Shift+Enter\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 092. 값 바꿔 끼우기\n",
    "\n",
    "반 이름을 담임 이름(A: 한선생, B: 오선생, C: 문선생)으로 바꾼 `teacher` 열을 만드세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 여기에 코드를 쓰고 Shift+Enter\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 093. 가장 잘한 과목\n",
    "\n",
    "학생마다 국어·영어·수학 중 점수가 가장 높은 과목의 열 이름을 구하세요. 결과의 인덱스는 학생 이름으로 하세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 여기에 코드를 쓰고 Shift+Enter\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 094. 같은 인원으로 나누기\n",
    "\n",
    "수학 점수를 사분위로 나눠 `Q1`~`Q4`를 붙이세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 여기에 코드를 쓰고 Shift+Enter\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 095. 누적 합계\n",
    "\n",
    "`daily`의 날짜별 누적 방문자 수를 구하세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 여기에 코드를 쓰고 Shift+Enter\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 096. 이동 평균\n",
    "\n",
    "`daily`의 3일 이동 평균 방문자 수를 소수 첫째 자리까지 구하세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 여기에 코드를 쓰고 Shift+Enter\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 097. 전날 대비 증감률\n",
    "\n",
    "전날 대비 방문자 증감률(%)을 소수 첫째 자리까지 구하세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 여기에 코드를 쓰고 Shift+Enter\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 098. 전날 값 옆에 놓기\n",
    "\n",
    "전날 방문자 수 열 `prev`와 차이 `diff`를 만드세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 여기에 코드를 쓰고 Shift+Enter\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 099. 과목 간 상관관계\n",
    "\n",
    "세 과목 점수의 상관계수 표를 구하세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 여기에 코드를 쓰고 Shift+Enter\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 100. 종합: 반별 리포트\n",
    "\n",
    "반별 학생 수, 평균 합계(소수 첫째 자리), 최고 득점자 이름을 한 표로 만들고 평균 합계가 높은 반부터 보이세요."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 여기에 코드를 쓰고 Shift+Enter\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
