{"cells":[
 {
  "cell_type": "code",
  "execution_count": null,
  "metadata": {
   "collapsed": false
  },
  "outputs": [],
  "source": "import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as pyplot\nimport matplotlib\n%matplotlib inline\nmatplotlib.rcParams.update({'font.size': 12})\nimg_list = pd.read_csv('../input/driver_imgs_list.csv')\n"
 },
 {
  "cell_type": "code",
  "execution_count": null,
  "metadata": {
   "collapsed": false
  },
  "outputs": [],
  "source": "img_list['class_type'] = img_list['classname'].str.extract('(\\d)',expand=False).astype(np.float)\npyplot.figure()\nimg_list.hist('class_type',alpha=0.5,layout=(1,1),bins=9)\npyplot.title('class distribution')\npyplot.draw()"
 },
 {
  "cell_type": "code",
  "execution_count": null,
  "metadata": {
   "collapsed": false
  },
  "outputs": [],
  "source": "img_list['subject_type'] = img_list['subject'].str.extract('(\\d\\d\\d)',expand=False).astype(np.int32)\nn_unique_sub=len(img_list['subject_type'].unique())\npyplot.figure()\nimg_list.hist('subject_type',layout=(1,1),bins=n_unique_sub)\npyplot.title('subject_type, # unique subject {}'.format(n_unique_sub))"
 },
 {
  "cell_type": "code",
  "execution_count": null,
  "metadata": {
   "collapsed": false
  },
  "outputs": [],
  "source": ""
 }
],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"}}, "nbformat": 4, "nbformat_minor": 0}