|
40 | 40 | } |
41 | 41 | }, |
42 | 42 | "source": [ |
43 | | - "{% if id == \"nyu\" -%}\n", |
44 | | - "- [Introductions thread](https://edstem.org/us/courses/68651/discussion/5579845)\n", |
45 | | - "{% endif -%}\n", |
46 | | - "- Questions?\n", |
47 | | - "- How was the homework? 👍/👎" |
48 | | - ] |
49 | | - }, |
50 | | - { |
51 | | - "cell_type": "markdown", |
52 | | - "metadata": { |
53 | | - "editable": true, |
54 | | - "slideshow": { |
55 | | - "slide_type": "slide" |
56 | | - }, |
57 | | - "tags": [] |
58 | | - }, |
59 | | - "source": [ |
60 | | - "## Generative AI\n", |
61 | | - "\n", |
62 | | - "We have [a policy](https://python-public-policy.afeld.me/en/{{school_slug}}/syllabus.html#academic-integrity)." |
| 43 | + "- How was the homework? 👍/👎\n", |
| 44 | + "- Questions?" |
63 | 45 | ] |
64 | 46 | }, |
65 | 47 | { |
|
331 | 313 | "cell_type": "code", |
332 | 314 | "execution_count": 3, |
333 | 315 | "metadata": { |
334 | | - "id": "iQgE8qFAMbiF" |
| 316 | + "editable": true, |
| 317 | + "id": "iQgE8qFAMbiF", |
| 318 | + "slideshow": { |
| 319 | + "slide_type": "" |
| 320 | + }, |
| 321 | + "tags": [] |
335 | 322 | }, |
336 | 323 | "outputs": [ |
337 | 324 | { |
|
2455 | 2442 | "cell_type": "code", |
2456 | 2443 | "execution_count": 13, |
2457 | 2444 | "metadata": { |
| 2445 | + "editable": true, |
2458 | 2446 | "id": "PII26jb0g8Eg", |
2459 | | - "outputId": "8c839d5d-da47-4576-b1cb-86a147ec52e7" |
| 2447 | + "outputId": "8c839d5d-da47-4576-b1cb-86a147ec52e7", |
| 2448 | + "slideshow": { |
| 2449 | + "slide_type": "" |
| 2450 | + }, |
| 2451 | + "tags": [] |
2460 | 2452 | }, |
2461 | 2453 | "outputs": [], |
2462 | 2454 | "source": [ |
2463 | 2455 | "valid_complaint_types = valid_complaint_counts[\"Complaint Type\"]\n", |
2464 | 2456 | "is_valid_complaint = requests[\"Complaint Type\"].isin(valid_complaint_types)\n", |
2465 | | - "df_cleaned = requests[is_valid_complaint]" |
| 2457 | + "requests_clean = requests[is_valid_complaint]" |
2466 | 2458 | ] |
2467 | 2459 | }, |
2468 | 2460 | { |
2469 | 2461 | "cell_type": "markdown", |
2470 | 2462 | "metadata": { |
| 2463 | + "editable": true, |
2471 | 2464 | "slideshow": { |
2472 | 2465 | "slide_type": "subslide" |
2473 | | - } |
| 2466 | + }, |
| 2467 | + "tags": [] |
2474 | 2468 | }, |
2475 | 2469 | "source": [ |
2476 | | - "How can we make sure this worked? Let's check how many records there were originally in `requests` vs how many are in `df_cleaned`.\n", |
| 2470 | + "How can we make sure this worked? Let's check how many records there were originally in `requests` vs how many are in `requests_clean`.\n", |
2477 | 2471 | "\n", |
2478 | 2472 | "Before:" |
2479 | 2473 | ] |
|
2534 | 2528 | } |
2535 | 2529 | ], |
2536 | 2530 | "source": [ |
2537 | | - "df_cleaned[\"Unique Key\"].size" |
| 2531 | + "requests_clean[\"Unique Key\"].size" |
2538 | 2532 | ] |
2539 | 2533 | }, |
2540 | 2534 | { |
|
2715 | 2709 | } |
2716 | 2710 | ], |
2717 | 2711 | "source": [ |
2718 | | - "df_cleaned.groupby(\"Complaint Type\").size().reset_index(name=\"count\")" |
| 2712 | + "requests_clean.groupby(\"Complaint Type\").size().reset_index(name=\"count\")" |
2719 | 2713 | ] |
2720 | 2714 | }, |
2721 | 2715 | { |
|
2940 | 2934 | ], |
2941 | 2935 | "source": [ |
2942 | 2936 | "agency_counts = (\n", |
2943 | | - " df_cleaned.groupby([\"Agency\", \"Complaint Type\"]).size().reset_index(name=\"count\")\n", |
| 2937 | + " requests_clean.groupby([\"Agency\", \"Complaint Type\"]).size().reset_index(name=\"count\")\n", |
2944 | 2938 | ")\n", |
2945 | 2939 | "agency_counts.head(20)" |
2946 | 2940 | ] |
|
0 commit comments