{
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2-final"
  },
  "orig_nbformat": 2,
  "kernelspec": {
   "name": "python_defaultSpec_1598600644800",
   "display_name": "Python 3.8.2 32-bit"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2,
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import csv_import\n",
    "import pandas as pd\n",
    "\n",
    "conn = csv_import.conn_string(csv_import.target_dsn)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "         COMP Vehicle_BKVehicleID Vehicle_DMSVehicleNumber  \\\ncount   38875               38875                    38875   \nunique      1               38698                    38698   \ntop        10            10_26195                    47372   \nfreq    38875                   2                        2   \n\n       Vehicle_CRMVehicleNumber Vehicle_Make Vehicle_MakeID    Vehicle_Model  \\\ncount                     38875        38875          38875            38875   \nunique                    38698           12             12             1902   \ntop                       47372         Opel            O_O  nicht definiert   \nfreq                          2        19501          19501            14795   \n\n       Vehicle_ModelID Vehicle_ModelLine Vehicle_ModelLineID  ...  \\\ncount            38875             38875               38875  ...   \nunique            2918               323                 395  ...   \ntop               ALLG   nicht definiert                ALLG  ...   \nfreq             14958             16084               16218  ...   \n\n       Vehicle_PreviousLastName Vehicle_PreviousUsage  \\\ncount                     38875                 38875   \nunique                     2236                     1   \ntop                                                     \nfreq                      35855                 38875   \n\n       Vehicle_VehicleModelDescription Vehicle_GovermentNumber  \\\ncount                            38837                   38837   \nunique                           15088                   31636   \ntop                Opel Zafira B Enjoy                           \nfreq                               260                    6728   \n\n       Vehicle_BuyingLocation Vehicle_VehicleModelGroupCode  \\\ncount                   38837                         38698   \nunique                     30                             4   \ntop                                                           \nfreq                    32014                         38646   \n\n       Vehicle_EngineSize Vehicle_VehicleWarrantyExpiryDate  \\\ncount               38698                             38698   \nunique                442                              7047   \ntop                     0                                     \nfreq                17319                             13532   \n\n       Vehicle_CompanyVehicle Vehicle_LiveStatus  \ncount                   38698              38698  \nunique                      2                  2  \ntop                         0                  L  \nfreq                    29892              19360  \n\n[4 rows x 70 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>COMP</th>\n      <th>Vehicle_BKVehicleID</th>\n      <th>Vehicle_DMSVehicleNumber</th>\n      <th>Vehicle_CRMVehicleNumber</th>\n      <th>Vehicle_Make</th>\n      <th>Vehicle_MakeID</th>\n      <th>Vehicle_Model</th>\n      <th>Vehicle_ModelID</th>\n      <th>Vehicle_ModelLine</th>\n      <th>Vehicle_ModelLineID</th>\n      <th>...</th>\n      <th>Vehicle_PreviousLastName</th>\n      <th>Vehicle_PreviousUsage</th>\n      <th>Vehicle_VehicleModelDescription</th>\n      <th>Vehicle_GovermentNumber</th>\n      <th>Vehicle_BuyingLocation</th>\n      <th>Vehicle_VehicleModelGroupCode</th>\n      <th>Vehicle_EngineSize</th>\n      <th>Vehicle_VehicleWarrantyExpiryDate</th>\n      <th>Vehicle_CompanyVehicle</th>\n      <th>Vehicle_LiveStatus</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>count</th>\n      <td>38875</td>\n      <td>38875</td>\n      <td>38875</td>\n      <td>38875</td>\n      <td>38875</td>\n      <td>38875</td>\n      <td>38875</td>\n      <td>38875</td>\n      <td>38875</td>\n      <td>38875</td>\n      <td>...</td>\n      <td>38875</td>\n      <td>38875</td>\n      <td>38837</td>\n      <td>38837</td>\n      <td>38837</td>\n      <td>38698</td>\n      <td>38698</td>\n      <td>38698</td>\n      <td>38698</td>\n      <td>38698</td>\n    </tr>\n    <tr>\n      <th>unique</th>\n      <td>1</td>\n      <td>38698</td>\n      <td>38698</td>\n      <td>38698</td>\n      <td>12</td>\n      <td>12</td>\n      <td>1902</td>\n      <td>2918</td>\n      <td>323</td>\n      <td>395</td>\n      <td>...</td>\n      <td>2236</td>\n      <td>1</td>\n      <td>15088</td>\n      <td>31636</td>\n      <td>30</td>\n      <td>4</td>\n      <td>442</td>\n      <td>7047</td>\n      <td>2</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>top</th>\n      <td>10</td>\n      <td>10_26195</td>\n      <td>47372</td>\n      <td>47372</td>\n      <td>Opel</td>\n      <td>O_O</td>\n      <td>nicht definiert</td>\n      <td>ALLG</td>\n      <td>nicht definiert</td>\n      <td>ALLG</td>\n      <td>...</td>\n      <td></td>\n      <td></td>\n      <td>Opel Zafira B Enjoy</td>\n      <td></td>\n      <td></td>\n      <td></td>\n      <td>0</td>\n      <td></td>\n      <td>0</td>\n      <td>L</td>\n    </tr>\n    <tr>\n      <th>freq</th>\n      <td>38875</td>\n      <td>2</td>\n      <td>2</td>\n      <td>2</td>\n      <td>19501</td>\n      <td>19501</td>\n      <td>14795</td>\n      <td>14958</td>\n      <td>16084</td>\n      <td>16218</td>\n      <td>...</td>\n      <td>35855</td>\n      <td>38875</td>\n      <td>260</td>\n      <td>6728</td>\n      <td>32014</td>\n      <td>38646</td>\n      <td>17319</td>\n      <td>13532</td>\n      <td>29892</td>\n      <td>19360</td>\n    </tr>\n  </tbody>\n</table>\n<p>4 rows × 70 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 6
    }
   ],
   "source": [
    "df = pd.read_sql_table(\"CRMVehicle\", conn, schema=\"import\")\n",
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ]
}