File size: 858 Bytes
e078b1d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "8f2bf560",
   "metadata": {},
   "source": [
    "# Data Exploration\n",
    "Load the U.S. Accidents dataset, inspect the Description field, and validate the text filtering logic."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "811a068e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from pathlib import Path\n",
    "path = Path('../data/raw/US_Accidents_March23.csv')\n",
    "if path.exists():\n",
    "    df = pd.read_csv(path, low_memory=False)\n",
    "    print(df[['Description']].head())\n",
    "    print(df['Description'].str.len().describe())\n",
    "else:\n",
    "    print('Place the Kaggle CSV under data/raw/ before running this notebook.')"
   ]
  }
 ],
 "metadata": {},
 "nbformat": 4,
 "nbformat_minor": 5
}