{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# HW6 In a Classifier Above the Rest\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Introduction"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Analysis and models "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Results"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Conclusion"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "\n",
    "import pandas as pd\n",
    "df = pd.read_csv('hw6_data_sentiment.csv')\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tabulate import tabulate\n",
    "\n",
    "df = hw6\n",
    "def shorten(long_string):\n",
    "    return long_string[:1] if len(long_string) < 21 else long_string[:20]\n",
    "\n",
    "def df_for_tabulate(df, column):\n",
    "    pretty_df = df.copy()\n",
    "    pretty_df[column] = pretty_df.apply(lambda x: shorten(x[column]), axis = 1)\n",
    "    return pretty_df\n",
    "    \n",
    "tabulate_df = df_for_tabulate(df, 0)\n",
    "print(tabulate(tabulate_df[:10], tablefmt=\"simple\", headers=tabulate_df.columns))\n",
    "\n",
    "\n",
    "\n",
    "# KAGGLE 0.58792\n",
    "# HOLDOUT 0.6236864026656415"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "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.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
