{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Popular Data Science Questions"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Our goal in this project is to use [Data Science Stack Exchange](https://datascience.stackexchange.com) to determine what content should a data science education company create, based on interest by subject."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Stack Exchange"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### What kind of questions are welcome on this site?\n",
    "\n",
    "On DSSE's help center's [section on questions](https://datascience.stackexchange.com/help/asking) , we can read that we should:\n",
    "\n",
    "* Avoid subjective questions.\n",
    "* Ask practical questions about Data Science — there are adequate sites for theoretical questions.\n",
    "* Ask specific questions.\n",
    "* Make questions relevant to others.\n",
    "\n",
    "All of these characteristics, if employed, should be helpful attributes to our goal.\n",
    "\n",
    "In the help center we also learned that in addition to the sites mentioned in the _Learn_ section, there are other two sites that are relevant:\n",
    "\n",
    "* [Open Data](https://opendata.stackexchange.com/help/on-topic) (Dataset requests)\n",
    "* [Computational Science](https://scicomp.stackexchange.com/help/on-topic) (Software packages and algorithms in applied mathematics)\n",
    "\n",
    "#### What, other than questions, does DSSE's [home](https://datascience.stackexchange.com) subdivide into?\n",
    "\n",
    "On the [home page](https://datascience.stackexchange.com/) we can see that we have four sections:\n",
    "\n",
    "* [Questions](https://datascience.stackexchange.com/questions) — a list of all questions asked;\n",
    "* [Tags](https://datascience.stackexchange.com/tags) — a list of tags (keywords or labels that categorize questions);\n",
    "\n",
    "    ![tags_ds](https://dq-content.s3.amazonaws.com/469/tags_ds.png)\n",
    "* [Users](https://datascience.stackexchange.com/users) — a list of users;\n",
    "* [Unanswered](https://datascience.stackexchange.com/unanswered) — a list of unanswered questions;\n",
    "\n",
    "The tagging system used by Stack Exchange looks just like what we need to solve this problem as it allow us to quantify how many questions are asked about each subject.\n",
    "\n",
    "Something else we can learn from exploring the help center, is that Stack Exchange's sites are heavily moderated by the community; this gives us some confidence in using the tagging system to derive conclusions.\n",
    "\n",
    "#### What information is available in each post?\n",
    "\n",
    "Looking, just as an example, at [this](https://datascience.stackexchange.com/questions/19141/linear-model-to-generate-probability-of-each-possible-output?rq=1) question, some of the information we see is:\n",
    "\n",
    "* For both questions and answers:\n",
    "    * The posts's score;\n",
    "    * The posts's title;\n",
    "    * The posts's author;\n",
    "    * The posts's body;\n",
    "* For questions only:\n",
    "    * How many users have it on their \"\n",
    "    * The last time the question as active;\n",
    "    * How many times the question was viewed;\n",
    "    * Related questions;\n",
    "    * The question's tags;\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Stack Exchange Data Explorer\n",
    "\n",
    "Perusing the table names, a few stand out as relevant for our goal:\n",
    "\n",
    "* Posts\n",
    "* PostTags\n",
    "* Tags\n",
    "* TagSynonyms\n",
    "\n",
    "Running a few exploratory queries, leads us to focus our efforts on `Posts` table. For examples, the `Tags` table looked very promising as it tells us how many times each tag was used, but there's no way to tell just from this if the interest in these tags is recent or a thing from the past.\n",
    "\n",
    "\n",
    "<table>\n",
    "  <tr>\n",
    "    <th>Id</th>\n",
    "    <th>TagName</th>\n",
    "    <th>Count</th>\n",
    "    <th>ExcerptPostId</th>\n",
    "    <th>WikiPostId</th>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>2</td>\n",
    "    <td>machine-learning</td>\n",
    "    <td>6919</td>\n",
    "    <td>4909</td>\n",
    "    <td>4908</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>46</td>\n",
    "    <td>python</td>\n",
    "    <td>3907</td>\n",
    "    <td>5523</td>\n",
    "    <td>5522</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>81</td>\n",
    "    <td>neural-network</td>\n",
    "    <td>2923</td>\n",
    "    <td>8885</td>\n",
    "    <td>8884</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>194</td>\n",
    "    <td>deep-learning</td>\n",
    "    <td>2786</td>\n",
    "    <td>8956</td>\n",
    "    <td>8955</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>77</td>\n",
    "    <td>classification</td>\n",
    "    <td>1899</td>\n",
    "    <td>4911</td>\n",
    "    <td>4910</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>324</td>\n",
    "    <td>keras</td>\n",
    "    <td>1736</td>\n",
    "    <td>9251</td>\n",
    "    <td>9250</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>128</td>\n",
    "    <td>scikit-learn</td>\n",
    "    <td>1303</td>\n",
    "    <td>5896</td>\n",
    "    <td>5895</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>321</td>\n",
    "    <td>tensorflow</td>\n",
    "    <td>1224</td>\n",
    "    <td>9183</td>\n",
    "    <td>9182</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>47</td>\n",
    "    <td>nlp</td>\n",
    "    <td>1162</td>\n",
    "    <td>147</td>\n",
    "    <td>146</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>24</td>\n",
    "    <td>r</td>\n",
    "    <td>1114</td>\n",
    "    <td>49</td>\n",
    "    <td>48</td>\n",
    "  </tr>\n",
    "</table>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Getting the Data\n",
    "\n",
    "To get the relevant data we run the following query.\n",
    "\n",
    "```\n",
    "SELECT Id, CreationDate,\n",
    "       Score, ViewCount, Tags,\n",
    "       AnswerCount, FavoriteCount\n",
    "  FROM posts\n",
    " WHERE PostTypeId = 1 AND YEAR(CreationDate) = 2019;\n",
    "```\n",
    "\n",
    "Here's what the first few rows look like:\n",
    "\n",
    "<table>\n",
    "  <tr>\n",
    "    <th>Id</th>\n",
    "    <th>PostTypeId</th>\n",
    "    <th>CreationDate</th>\n",
    "    <th>Score</th>\n",
    "    <th>ViewCount</th>\n",
    "    <th>Tags</th>\n",
    "    <th>AnswerCount</th>\n",
    "    <th>FavoriteCount</th>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>44419</td>\n",
    "    <td>1</td>\n",
    "    <td>2019-01-23 09:21:13</td>\n",
    "    <td>1</td>\n",
    "    <td>21</td>\n",
    "    <td>&lt;machine-learning&gt;&lt;data-mining&gt;</td>\n",
    "    <td>0</td>\n",
    "    <td></td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>44420</td>\n",
    "    <td>1</td>\n",
    "    <td>2019-01-23 09:34:01</td>\n",
    "    <td>0</td>\n",
    "    <td>25</td>\n",
    "    <td>&lt;machine-learning&gt;&lt;regression&gt;&lt;linear-regression&gt;&lt;regularization&gt;</td>\n",
    "    <td>0</td>\n",
    "    <td></td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>44423</td>\n",
    "    <td>1</td>\n",
    "    <td>2019-01-23 09:58:41</td>\n",
    "    <td>2</td>\n",
    "    <td>1651</td>\n",
    "    <td>&lt;python&gt;&lt;time-series&gt;&lt;forecast&gt;&lt;forecasting&gt;</td>\n",
    "    <td>0</td>\n",
    "    <td></td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>44427</td>\n",
    "    <td>1</td>\n",
    "    <td>2019-01-23 10:57:09</td>\n",
    "    <td>0</td>\n",
    "    <td>55</td>\n",
    "    <td>&lt;machine-learning&gt;&lt;scikit-learn&gt;&lt;pca&gt;</td>\n",
    "    <td>1</td>\n",
    "    <td></td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>44428</td>\n",
    "    <td>1</td>\n",
    "    <td>2019-01-23 11:02:15</td>\n",
    "    <td>0</td>\n",
    "    <td>19</td>\n",
    "    <td>&lt;dataset&gt;&lt;bigdata&gt;&lt;data&gt;&lt;speech-to-text&gt;</td>\n",
    "    <td>0</td>\n",
    "    <td></td>\n",
    "  </tr>\n",
    "</table>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Exploring the Data\n",
    "\n",
    "We can read in the data while immediately making sure `CreationDate` will be stored as a datetime object:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# We import everything that we'll use\n",
    "\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "questions = pd.read_csv(\"2019_questions.csv\", parse_dates=[\"CreationDate\"])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Running [`questions.info()`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.info.html) should gives a lot of useful information."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 8839 entries, 0 to 8838\n",
      "Data columns (total 7 columns):\n",
      " #   Column         Non-Null Count  Dtype         \n",
      "---  ------         --------------  -----         \n",
      " 0   Id             8839 non-null   int64         \n",
      " 1   CreationDate   8839 non-null   datetime64[ns]\n",
      " 2   Score          8839 non-null   int64         \n",
      " 3   ViewCount      8839 non-null   int64         \n",
      " 4   Tags           8839 non-null   object        \n",
      " 5   AnswerCount    8839 non-null   int64         \n",
      " 6   FavoriteCount  1407 non-null   float64       \n",
      "dtypes: datetime64[ns](1), float64(1), int64(4), object(1)\n",
      "memory usage: 483.5+ KB\n"
     ]
    }
   ],
   "source": [
    "questions.info()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We see that only `FavoriteCount` has missing values. A missing value on this column probably means that the question was is not present in any users' favorite list, so we can replace the missing values with zero.\n",
    "\n",
    "The types seem adequate for every column, however, after we fill in the missing values on `FavoriteCount`, there is no reason to store the values as floats.\n",
    "\n",
    "Since the `object` dtype is a catch-all type, let's see what types the objects in `questions[\"Tags\"]` are."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([<class 'str'>], dtype=object)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "questions[\"Tags\"].apply(lambda value: type(value)).unique()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We see that every value in this column is a string. On Stack Exchange, each question can only have a maximum of five tags ([source](https://meta.stackexchange.com/a/18879)), so one way to deal with this column is to create five columns in `questions` called `Tag1`, `Tag2`, `Tag3`, `Tag4`, and `Tag5` and populate the columns with the tags in each row.\n",
    "\n",
    "However, since doesn't help is relating tags from one question to another, we'll just keep them as a list."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Cleaning the Data\n",
    "\n",
    "We'll begin by fixing `FavoriteCount`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Id                        int64\n",
       "CreationDate     datetime64[ns]\n",
       "Score                     int64\n",
       "ViewCount                 int64\n",
       "Tags                     object\n",
       "AnswerCount               int64\n",
       "FavoriteCount             int64\n",
       "dtype: object"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "questions.fillna(value={\"FavoriteCount\": 0}, inplace=True)\n",
    "questions[\"FavoriteCount\"] = questions[\"FavoriteCount\"].astype(int)\n",
    "questions.dtypes"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's now modify `Tags` to make it easier to work with."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "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>Id</th>\n",
       "      <th>CreationDate</th>\n",
       "      <th>Score</th>\n",
       "      <th>ViewCount</th>\n",
       "      <th>Tags</th>\n",
       "      <th>AnswerCount</th>\n",
       "      <th>FavoriteCount</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>511</th>\n",
       "      <td>56382</td>\n",
       "      <td>2019-07-25 15:00:20</td>\n",
       "      <td>0</td>\n",
       "      <td>34</td>\n",
       "      <td>[machine-learning, python, pandas, natural-lan...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2178</th>\n",
       "      <td>58312</td>\n",
       "      <td>2019-08-28 09:44:00</td>\n",
       "      <td>1</td>\n",
       "      <td>41</td>\n",
       "      <td>[neural-network, pytorch]</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2536</th>\n",
       "      <td>58151</td>\n",
       "      <td>2019-08-25 01:01:29</td>\n",
       "      <td>0</td>\n",
       "      <td>37</td>\n",
       "      <td>[dataset, audio-recognition]</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         Id        CreationDate  Score  ViewCount  \\\n",
       "511   56382 2019-07-25 15:00:20      0         34   \n",
       "2178  58312 2019-08-28 09:44:00      1         41   \n",
       "2536  58151 2019-08-25 01:01:29      0         37   \n",
       "\n",
       "                                                   Tags  AnswerCount  \\\n",
       "511   [machine-learning, python, pandas, natural-lan...            0   \n",
       "2178                          [neural-network, pytorch]            0   \n",
       "2536                       [dataset, audio-recognition]            2   \n",
       "\n",
       "      FavoriteCount  \n",
       "511               0  \n",
       "2178              1  \n",
       "2536              0  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "questions[\"Tags\"] = questions[\"Tags\"].str.replace(\"^<|>$\", \"\").str.split(\"><\")\n",
    "questions.sample(3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Most Used and Most Viewed\n",
    "\n",
    "We'll begin by counting how many times each tag was used"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "tag_count = dict()\n",
    "\n",
    "for tags in questions[\"Tags\"]:\n",
    "    for tag in tags:\n",
    "        if tag in tag_count:\n",
    "            tag_count[tag] += 1\n",
    "        else:\n",
    "            tag_count[tag] = 1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For improved aesthetics, let's transform `tag_count` in a dataframe."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "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>Count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>machine-learning</th>\n",
       "      <td>2693</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>data-mining</th>\n",
       "      <td>217</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regression</th>\n",
       "      <td>347</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>linear-regression</th>\n",
       "      <td>175</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regularization</th>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>python</th>\n",
       "      <td>1814</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time-series</th>\n",
       "      <td>466</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>forecast</th>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>forecasting</th>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>scikit-learn</th>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   Count\n",
       "machine-learning    2693\n",
       "data-mining          217\n",
       "regression           347\n",
       "linear-regression    175\n",
       "regularization        50\n",
       "python              1814\n",
       "time-series          466\n",
       "forecast              34\n",
       "forecasting           85\n",
       "scikit-learn         540"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tag_count = pd.DataFrame.from_dict(tag_count, orient=\"index\")\n",
    "tag_count.rename(columns={0: \"Count\"}, inplace=True)\n",
    "tag_count.head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's now sort this dataframe by `Count` and visualize the top 20 results."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "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>Count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>machine-learning-model</th>\n",
       "      <td>224</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>statistics</th>\n",
       "      <td>234</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>clustering</th>\n",
       "      <td>257</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>predictive-modeling</th>\n",
       "      <td>265</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>r</th>\n",
       "      <td>268</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>dataset</th>\n",
       "      <td>340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regression</th>\n",
       "      <td>347</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pandas</th>\n",
       "      <td>354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>lstm</th>\n",
       "      <td>402</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time-series</th>\n",
       "      <td>466</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>cnn</th>\n",
       "      <td>489</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>nlp</th>\n",
       "      <td>493</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>scikit-learn</th>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>tensorflow</th>\n",
       "      <td>584</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>classification</th>\n",
       "      <td>685</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>keras</th>\n",
       "      <td>935</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>neural-network</th>\n",
       "      <td>1055</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>deep-learning</th>\n",
       "      <td>1220</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>python</th>\n",
       "      <td>1814</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>machine-learning</th>\n",
       "      <td>2693</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                        Count\n",
       "machine-learning-model    224\n",
       "statistics                234\n",
       "clustering                257\n",
       "predictive-modeling       265\n",
       "r                         268\n",
       "dataset                   340\n",
       "regression                347\n",
       "pandas                    354\n",
       "lstm                      402\n",
       "time-series               466\n",
       "cnn                       489\n",
       "nlp                       493\n",
       "scikit-learn              540\n",
       "tensorflow                584\n",
       "classification            685\n",
       "keras                     935\n",
       "neural-network           1055\n",
       "deep-learning            1220\n",
       "python                   1814\n",
       "machine-learning         2693"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "most_used = tag_count.sort_values(by=\"Count\").tail(20)\n",
    "most_used"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The threshold of `20` is somewhat arbitrary and we can experiment with others, however, popularity of the tags rapidly declines, so looking at these tags should be enough to help us with our goal. Let's visualize these data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f2f948a2e50>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 23544 characters]\n",
      "text/plain": [
       "<Figure size 1152x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "most_used.plot(kind=\"barh\", figsize=(16,8))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Some tags are very, very broad and are unlikely to be useful; e.g.: `python`, `dataset`, `r`. Before we investigate the tags a little deeper, let's repeat the same process for views.\n",
    "\n",
    "We'll use Python's builtin [`enumerate()`](https://docs.python.org/3/library/functions.html#enumerate) function. Its utility is well understood by seeing it action."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0 I\n",
      "1 t\n",
      "2 e\n",
      "3 r\n",
      "4 a\n",
      "5 t\n",
      "6 e\n",
      "7  \n",
      "8 t\n",
      "9 h\n",
      "10 i\n",
      "11 s\n",
      "12 !\n"
     ]
    }
   ],
   "source": [
    "some_iterable = \"Iterate this!\"\n",
    "\n",
    "for i,c in enumerate(some_iterable):\n",
    "    print(i,c)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In addition to the elements of `some_iterable`, `enumerate` gives us the index of each of them."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f2f938fb350>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 23264 characters]\n",
      "text/plain": [
       "<Figure size 1152x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "tag_view_count = dict()\n",
    "\n",
    "for idx, tags in enumerate(questions[\"Tags\"]):\n",
    "    for tag in tags:\n",
    "        if tag in tag_view_count:\n",
    "            tag_view_count[tag] += questions[\"ViewCount\"].iloc[idx]\n",
    "        else:\n",
    "            tag_view_count[tag] = questions[\"ViewCount\"].iloc[idx]\n",
    "            \n",
    "tag_view_count = pd.DataFrame.from_dict(tag_view_count, orient=\"index\")\n",
    "tag_view_count.rename(columns={0: \"ViewCount\"}, inplace=True)\n",
    "\n",
    "most_viewed = tag_view_count.sort_values(by=\"ViewCount\").tail(20)\n",
    "\n",
    "most_viewed.plot(kind=\"barh\", figsize=(16,8))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's see them side by side."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f2f93aa7210>],\n",
       "      dtype=object)"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 42372 characters]\n",
      "text/plain": [
       "<Figure size 1728x720 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, axes = plt.subplots(nrows=1, ncols=2)\n",
    "fig.set_size_inches((24, 10))\n",
    "most_used.plot(kind=\"barh\", ax=axes[0], subplots=True)\n",
    "most_viewed.plot(kind=\"barh\", ax=axes[1], subplots=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "in_used = pd.merge(most_used, most_viewed, how=\"left\", left_index=True, right_index=True)\n",
    "in_viewed = pd.merge(most_used, most_viewed, how=\"right\", left_index=True, right_index=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Relations Between Tags"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "One way of trying to gauge how pairs of tags are related to each other, is to count how many times each pair appears together. Let's do this.\n",
    "\n",
    "We'll begin by creating a list of all tags."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "all_tags = list(tag_count.index)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We'll now create a dataframe where each row will represent a tag, and each column as well. Something like this:\n",
    "\n",
    "<table class=\"dataframe\" border=\"1\">\n",
    "  <thead>\n",
    "    <tr style=\"text-align: right;\">\n",
    "      <th></th>\n",
    "      <th>tag1</th>\n",
    "      <th>tag2</th>\n",
    "      <th>tag3</th>\n",
    "    </tr>\n",
    "  </thead>\n",
    "  <tbody>\n",
    "    <tr>\n",
    "      <th>tag1</th>\n",
    "      <td></td>\n",
    "      <td></td>\n",
    "      <td></td>\n",
    "    </tr>\n",
    "    <tr>\n",
    "      <th>tag2</th>\n",
    "      <td></td>\n",
    "      <td></td>\n",
    "      <td></td>\n",
    "    </tr>\n",
    "    <tr>\n",
    "      <th>tag3</th>\n",
    "      <td></td>\n",
    "      <td></td>\n",
    "      <td></td>\n",
    "    </tr>\n",
    "  </tbody>\n",
    "</table>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "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>machine-learning</th>\n",
       "      <th>data-mining</th>\n",
       "      <th>regression</th>\n",
       "      <th>linear-regression</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>machine-learning</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>data-mining</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regression</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>linear-regression</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  machine-learning data-mining regression linear-regression\n",
       "machine-learning               NaN         NaN        NaN               NaN\n",
       "data-mining                    NaN         NaN        NaN               NaN\n",
       "regression                     NaN         NaN        NaN               NaN\n",
       "linear-regression              NaN         NaN        NaN               NaN"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "associations = pd.DataFrame(index=all_tags, columns=all_tags)\n",
    "associations.iloc[0:4,0:4]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We will now fill this dataframe with zeroes and then, for each lists of tags in `questions[\"Tags\"]`, we will increment the intervening tags by one. The end result will be a dataframe that for each pair of tags, it tells us how many times they were used together."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "associations.fillna(0, inplace=True)\n",
    "\n",
    "for tags in questions[\"Tags\"]:\n",
    "    associations.loc[tags, tags] += 1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This dataframe is quite large. Let's focus our attention on the most used tags. We'll add some colors to make it easier to talk about the dataframe. (At the time of this writing, GitHub's renderer does not display the colors, we suggest you use this solution notebook together with [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/))."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col0 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col1 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col2 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col3 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col4 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col9 {\n",
       "            background-color:  yellow;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col5 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col6 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col7 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col8 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col4 {\n",
       "            background-color:  yellow;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col9 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col10 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col11 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col12 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col13 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col14 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col15 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col16 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col17 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col18 {\n",
       "            color:  blue;\n",
       "        }    #T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col19 {\n",
       "            color:  blue;\n",
       "        }</style><table id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >machine-learning-model</th>        <th class=\"col_heading level0 col1\" >statistics</th>        <th class=\"col_heading level0 col2\" >clustering</th>        <th class=\"col_heading level0 col3\" >predictive-modeling</th>        <th class=\"col_heading level0 col4\" >r</th>        <th class=\"col_heading level0 col5\" >dataset</th>        <th class=\"col_heading level0 col6\" >regression</th>        <th class=\"col_heading level0 col7\" >pandas</th>        <th class=\"col_heading level0 col8\" >lstm</th>        <th class=\"col_heading level0 col9\" >time-series</th>        <th class=\"col_heading level0 col10\" >cnn</th>        <th class=\"col_heading level0 col11\" >nlp</th>        <th class=\"col_heading level0 col12\" >scikit-learn</th>        <th class=\"col_heading level0 col13\" >tensorflow</th>        <th class=\"col_heading level0 col14\" >classification</th>        <th class=\"col_heading level0 col15\" >keras</th>        <th class=\"col_heading level0 col16\" >neural-network</th>        <th class=\"col_heading level0 col17\" >deep-learning</th>        <th class=\"col_heading level0 col18\" >python</th>        <th class=\"col_heading level0 col19\" >machine-learning</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row0\" class=\"row_heading level0 row0\" >machine-learning-model</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col0\" class=\"data row0 col0\" >224</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col1\" class=\"data row0 col1\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col2\" class=\"data row0 col2\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col4\" class=\"data row0 col4\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col5\" class=\"data row0 col5\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col6\" class=\"data row0 col6\" >8</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col7\" class=\"data row0 col7\" >4</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col8\" class=\"data row0 col8\" >5</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col9\" class=\"data row0 col9\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col10\" class=\"data row0 col10\" >4</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col11\" class=\"data row0 col11\" >4</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col12\" class=\"data row0 col12\" >18</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col13\" class=\"data row0 col13\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col14\" class=\"data row0 col14\" >21</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col15\" class=\"data row0 col15\" >17</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col16\" class=\"data row0 col16\" >10</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col17\" class=\"data row0 col17\" >19</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col18\" class=\"data row0 col18\" >37</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row0_col19\" class=\"data row0 col19\" >139</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row1\" class=\"row_heading level0 row1\" >statistics</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col0\" class=\"data row1 col0\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col1\" class=\"data row1 col1\" >234</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col2\" class=\"data row1 col2\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col3\" class=\"data row1 col3\" >16</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col4\" class=\"data row1 col4\" >16</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col5\" class=\"data row1 col5\" >17</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col6\" class=\"data row1 col6\" >16</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col7\" class=\"data row1 col7\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col8\" class=\"data row1 col8\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col9\" class=\"data row1 col9\" >22</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col10\" class=\"data row1 col10\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col11\" class=\"data row1 col11\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col12\" class=\"data row1 col12\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col13\" class=\"data row1 col13\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col14\" class=\"data row1 col14\" >19</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col15\" class=\"data row1 col15\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col16\" class=\"data row1 col16\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col17\" class=\"data row1 col17\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col18\" class=\"data row1 col18\" >35</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row1_col19\" class=\"data row1 col19\" >89</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row2\" class=\"row_heading level0 row2\" >clustering</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col0\" class=\"data row2 col0\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col1\" class=\"data row2 col1\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col2\" class=\"data row2 col2\" >257</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col3\" class=\"data row2 col3\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col4\" class=\"data row2 col4\" >16</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col5\" class=\"data row2 col5\" >5</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col6\" class=\"data row2 col6\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col7\" class=\"data row2 col7\" >5</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col8\" class=\"data row2 col8\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col9\" class=\"data row2 col9\" >20</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col10\" class=\"data row2 col10\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col11\" class=\"data row2 col11\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col12\" class=\"data row2 col12\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col13\" class=\"data row2 col13\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col14\" class=\"data row2 col14\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col15\" class=\"data row2 col15\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col16\" class=\"data row2 col16\" >8</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col17\" class=\"data row2 col17\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col18\" class=\"data row2 col18\" >45</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row2_col19\" class=\"data row2 col19\" >61</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row3\" class=\"row_heading level0 row3\" >predictive-modeling</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col0\" class=\"data row3 col0\" >21</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col1\" class=\"data row3 col1\" >16</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col2\" class=\"data row3 col2\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col3\" class=\"data row3 col3\" >265</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col4\" class=\"data row3 col4\" >13</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col5\" class=\"data row3 col5\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col6\" class=\"data row3 col6\" >28</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col7\" class=\"data row3 col7\" >4</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col8\" class=\"data row3 col8\" >13</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col9\" class=\"data row3 col9\" >31</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col10\" class=\"data row3 col10\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col11\" class=\"data row3 col11\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col12\" class=\"data row3 col12\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col13\" class=\"data row3 col13\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col14\" class=\"data row3 col14\" >27</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col15\" class=\"data row3 col15\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col16\" class=\"data row3 col16\" >13</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col17\" class=\"data row3 col17\" >32</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col18\" class=\"data row3 col18\" >35</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row3_col19\" class=\"data row3 col19\" >123</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row4\" class=\"row_heading level0 row4\" >r</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col0\" class=\"data row4 col0\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col1\" class=\"data row4 col1\" >16</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col2\" class=\"data row4 col2\" >16</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col3\" class=\"data row4 col3\" >13</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col4\" class=\"data row4 col4\" >268</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col5\" class=\"data row4 col5\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col6\" class=\"data row4 col6\" >10</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col7\" class=\"data row4 col7\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col8\" class=\"data row4 col8\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col9\" class=\"data row4 col9\" >22</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col10\" class=\"data row4 col10\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col11\" class=\"data row4 col11\" >4</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col12\" class=\"data row4 col12\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col13\" class=\"data row4 col13\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col14\" class=\"data row4 col14\" >10</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col15\" class=\"data row4 col15\" >10</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col16\" class=\"data row4 col16\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col17\" class=\"data row4 col17\" >5</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col18\" class=\"data row4 col18\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row4_col19\" class=\"data row4 col19\" >63</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row5\" class=\"row_heading level0 row5\" >dataset</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col0\" class=\"data row5 col0\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col1\" class=\"data row5 col1\" >17</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col2\" class=\"data row5 col2\" >5</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col3\" class=\"data row5 col3\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col4\" class=\"data row5 col4\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col5\" class=\"data row5 col5\" >340</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col6\" class=\"data row5 col6\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col7\" class=\"data row5 col7\" >14</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col8\" class=\"data row5 col8\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col9\" class=\"data row5 col9\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col10\" class=\"data row5 col10\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col11\" class=\"data row5 col11\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col12\" class=\"data row5 col12\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col13\" class=\"data row5 col13\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col14\" class=\"data row5 col14\" >28</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col15\" class=\"data row5 col15\" >13</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col16\" class=\"data row5 col16\" >20</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col17\" class=\"data row5 col17\" >32</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col18\" class=\"data row5 col18\" >53</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row5_col19\" class=\"data row5 col19\" >99</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row6\" class=\"row_heading level0 row6\" >regression</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col0\" class=\"data row6 col0\" >8</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col1\" class=\"data row6 col1\" >16</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col2\" class=\"data row6 col2\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col3\" class=\"data row6 col3\" >28</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col4\" class=\"data row6 col4\" >10</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col5\" class=\"data row6 col5\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col6\" class=\"data row6 col6\" >347</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col7\" class=\"data row6 col7\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col8\" class=\"data row6 col8\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col9\" class=\"data row6 col9\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col10\" class=\"data row6 col10\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col11\" class=\"data row6 col11\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col12\" class=\"data row6 col12\" >37</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col13\" class=\"data row6 col13\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col14\" class=\"data row6 col14\" >34</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col15\" class=\"data row6 col15\" >31</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col16\" class=\"data row6 col16\" >42</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col17\" class=\"data row6 col17\" >21</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col18\" class=\"data row6 col18\" >59</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row6_col19\" class=\"data row6 col19\" >119</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row7\" class=\"row_heading level0 row7\" >pandas</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col0\" class=\"data row7 col0\" >4</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col1\" class=\"data row7 col1\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col2\" class=\"data row7 col2\" >5</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col3\" class=\"data row7 col3\" >4</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col4\" class=\"data row7 col4\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col5\" class=\"data row7 col5\" >14</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col6\" class=\"data row7 col6\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col7\" class=\"data row7 col7\" >354</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col8\" class=\"data row7 col8\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col9\" class=\"data row7 col9\" >19</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col10\" class=\"data row7 col10\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col11\" class=\"data row7 col11\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col12\" class=\"data row7 col12\" >37</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col13\" class=\"data row7 col13\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col14\" class=\"data row7 col14\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col15\" class=\"data row7 col15\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col16\" class=\"data row7 col16\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col17\" class=\"data row7 col17\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col18\" class=\"data row7 col18\" >244</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row7_col19\" class=\"data row7 col19\" >62</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row8\" class=\"row_heading level0 row8\" >lstm</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col0\" class=\"data row8 col0\" >5</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col1\" class=\"data row8 col1\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col2\" class=\"data row8 col2\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col3\" class=\"data row8 col3\" >13</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col4\" class=\"data row8 col4\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col5\" class=\"data row8 col5\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col6\" class=\"data row8 col6\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col7\" class=\"data row8 col7\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col8\" class=\"data row8 col8\" >402</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col9\" class=\"data row8 col9\" >87</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col10\" class=\"data row8 col10\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col11\" class=\"data row8 col11\" >19</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col12\" class=\"data row8 col12\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col13\" class=\"data row8 col13\" >43</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col14\" class=\"data row8 col14\" >20</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col15\" class=\"data row8 col15\" >133</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col16\" class=\"data row8 col16\" >69</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col17\" class=\"data row8 col17\" >103</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col18\" class=\"data row8 col18\" >61</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row8_col19\" class=\"data row8 col19\" >71</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row9\" class=\"row_heading level0 row9\" >time-series</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col0\" class=\"data row9 col0\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col1\" class=\"data row9 col1\" >22</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col2\" class=\"data row9 col2\" >20</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col3\" class=\"data row9 col3\" >31</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col4\" class=\"data row9 col4\" >22</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col5\" class=\"data row9 col5\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col6\" class=\"data row9 col6\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col7\" class=\"data row9 col7\" >19</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col8\" class=\"data row9 col8\" >87</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col9\" class=\"data row9 col9\" >466</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col10\" class=\"data row9 col10\" >8</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col11\" class=\"data row9 col11\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col12\" class=\"data row9 col12\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col13\" class=\"data row9 col13\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col14\" class=\"data row9 col14\" >25</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col15\" class=\"data row9 col15\" >51</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col16\" class=\"data row9 col16\" >33</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col17\" class=\"data row9 col17\" >44</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col18\" class=\"data row9 col18\" >105</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row9_col19\" class=\"data row9 col19\" >131</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row10\" class=\"row_heading level0 row10\" >cnn</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col0\" class=\"data row10 col0\" >4</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col1\" class=\"data row10 col1\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col2\" class=\"data row10 col2\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col3\" class=\"data row10 col3\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col4\" class=\"data row10 col4\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col5\" class=\"data row10 col5\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col6\" class=\"data row10 col6\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col7\" class=\"data row10 col7\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col8\" class=\"data row10 col8\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col9\" class=\"data row10 col9\" >8</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col10\" class=\"data row10 col10\" >489</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col11\" class=\"data row10 col11\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col12\" class=\"data row10 col12\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col13\" class=\"data row10 col13\" >57</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col14\" class=\"data row10 col14\" >20</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col15\" class=\"data row10 col15\" >116</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col16\" class=\"data row10 col16\" >118</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col17\" class=\"data row10 col17\" >160</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col18\" class=\"data row10 col18\" >62</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row10_col19\" class=\"data row10 col19\" >124</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row11\" class=\"row_heading level0 row11\" >nlp</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col0\" class=\"data row11 col0\" >4</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col1\" class=\"data row11 col1\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col2\" class=\"data row11 col2\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col3\" class=\"data row11 col3\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col4\" class=\"data row11 col4\" >4</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col5\" class=\"data row11 col5\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col6\" class=\"data row11 col6\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col7\" class=\"data row11 col7\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col8\" class=\"data row11 col8\" >19</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col9\" class=\"data row11 col9\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col10\" class=\"data row11 col10\" >7</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col11\" class=\"data row11 col11\" >493</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col12\" class=\"data row11 col12\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col13\" class=\"data row11 col13\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col14\" class=\"data row11 col14\" >35</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col15\" class=\"data row11 col15\" >23</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col16\" class=\"data row11 col16\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col17\" class=\"data row11 col17\" >72</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col18\" class=\"data row11 col18\" >71</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row11_col19\" class=\"data row11 col19\" >113</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row12\" class=\"row_heading level0 row12\" >scikit-learn</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col0\" class=\"data row12 col0\" >18</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col1\" class=\"data row12 col1\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col2\" class=\"data row12 col2\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col3\" class=\"data row12 col3\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col4\" class=\"data row12 col4\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col5\" class=\"data row12 col5\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col6\" class=\"data row12 col6\" >37</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col7\" class=\"data row12 col7\" >37</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col8\" class=\"data row12 col8\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col9\" class=\"data row12 col9\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col10\" class=\"data row12 col10\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col11\" class=\"data row12 col11\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col12\" class=\"data row12 col12\" >540</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col13\" class=\"data row12 col13\" >15</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col14\" class=\"data row12 col14\" >47</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col15\" class=\"data row12 col15\" >34</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col16\" class=\"data row12 col16\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col17\" class=\"data row12 col17\" >16</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col18\" class=\"data row12 col18\" >235</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row12_col19\" class=\"data row12 col19\" >188</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row13\" class=\"row_heading level0 row13\" >tensorflow</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col0\" class=\"data row13 col0\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col1\" class=\"data row13 col1\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col2\" class=\"data row13 col2\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col3\" class=\"data row13 col3\" >6</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col4\" class=\"data row13 col4\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col5\" class=\"data row13 col5\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col6\" class=\"data row13 col6\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col7\" class=\"data row13 col7\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col8\" class=\"data row13 col8\" >43</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col9\" class=\"data row13 col9\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col10\" class=\"data row13 col10\" >57</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col11\" class=\"data row13 col11\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col12\" class=\"data row13 col12\" >15</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col13\" class=\"data row13 col13\" >584</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col14\" class=\"data row13 col14\" >20</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col15\" class=\"data row13 col15\" >256</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col16\" class=\"data row13 col16\" >108</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col17\" class=\"data row13 col17\" >136</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col18\" class=\"data row13 col18\" >167</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row13_col19\" class=\"data row13 col19\" >106</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row14\" class=\"row_heading level0 row14\" >classification</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col0\" class=\"data row14 col0\" >21</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col1\" class=\"data row14 col1\" >19</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col2\" class=\"data row14 col2\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col3\" class=\"data row14 col3\" >27</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col4\" class=\"data row14 col4\" >10</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col5\" class=\"data row14 col5\" >28</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col6\" class=\"data row14 col6\" >34</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col7\" class=\"data row14 col7\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col8\" class=\"data row14 col8\" >20</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col9\" class=\"data row14 col9\" >25</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col10\" class=\"data row14 col10\" >20</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col11\" class=\"data row14 col11\" >35</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col12\" class=\"data row14 col12\" >47</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col13\" class=\"data row14 col13\" >20</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col14\" class=\"data row14 col14\" >685</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col15\" class=\"data row14 col15\" >58</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col16\" class=\"data row14 col16\" >65</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col17\" class=\"data row14 col17\" >59</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col18\" class=\"data row14 col18\" >98</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row14_col19\" class=\"data row14 col19\" >259</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row15\" class=\"row_heading level0 row15\" >keras</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col0\" class=\"data row15 col0\" >17</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col1\" class=\"data row15 col1\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col2\" class=\"data row15 col2\" >0</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col3\" class=\"data row15 col3\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col4\" class=\"data row15 col4\" >10</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col5\" class=\"data row15 col5\" >13</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col6\" class=\"data row15 col6\" >31</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col7\" class=\"data row15 col7\" >3</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col8\" class=\"data row15 col8\" >133</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col9\" class=\"data row15 col9\" >51</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col10\" class=\"data row15 col10\" >116</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col11\" class=\"data row15 col11\" >23</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col12\" class=\"data row15 col12\" >34</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col13\" class=\"data row15 col13\" >256</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col14\" class=\"data row15 col14\" >58</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col15\" class=\"data row15 col15\" >935</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col16\" class=\"data row15 col16\" >235</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col17\" class=\"data row15 col17\" >247</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col18\" class=\"data row15 col18\" >280</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row15_col19\" class=\"data row15 col19\" >195</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row16\" class=\"row_heading level0 row16\" >neural-network</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col0\" class=\"data row16 col0\" >10</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col1\" class=\"data row16 col1\" >11</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col2\" class=\"data row16 col2\" >8</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col3\" class=\"data row16 col3\" >13</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col4\" class=\"data row16 col4\" >9</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col5\" class=\"data row16 col5\" >20</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col6\" class=\"data row16 col6\" >42</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col7\" class=\"data row16 col7\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col8\" class=\"data row16 col8\" >69</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col9\" class=\"data row16 col9\" >33</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col10\" class=\"data row16 col10\" >118</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col11\" class=\"data row16 col11\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col12\" class=\"data row16 col12\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col13\" class=\"data row16 col13\" >108</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col14\" class=\"data row16 col14\" >65</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col15\" class=\"data row16 col15\" >235</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col16\" class=\"data row16 col16\" >1055</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col17\" class=\"data row16 col17\" >305</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col18\" class=\"data row16 col18\" >137</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row16_col19\" class=\"data row16 col19\" >366</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row17\" class=\"row_heading level0 row17\" >deep-learning</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col0\" class=\"data row17 col0\" >19</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col1\" class=\"data row17 col1\" >12</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col2\" class=\"data row17 col2\" >2</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col3\" class=\"data row17 col3\" >32</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col4\" class=\"data row17 col4\" >5</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col5\" class=\"data row17 col5\" >32</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col6\" class=\"data row17 col6\" >21</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col7\" class=\"data row17 col7\" >1</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col8\" class=\"data row17 col8\" >103</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col9\" class=\"data row17 col9\" >44</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col10\" class=\"data row17 col10\" >160</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col11\" class=\"data row17 col11\" >72</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col12\" class=\"data row17 col12\" >16</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col13\" class=\"data row17 col13\" >136</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col14\" class=\"data row17 col14\" >59</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col15\" class=\"data row17 col15\" >247</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col16\" class=\"data row17 col16\" >305</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col17\" class=\"data row17 col17\" >1220</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col18\" class=\"data row17 col18\" >160</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row17_col19\" class=\"data row17 col19\" >429</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row18\" class=\"row_heading level0 row18\" >python</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col0\" class=\"data row18 col0\" >37</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col1\" class=\"data row18 col1\" >35</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col2\" class=\"data row18 col2\" >45</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col3\" class=\"data row18 col3\" >35</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col4\" class=\"data row18 col4\" >24</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col5\" class=\"data row18 col5\" >53</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col6\" class=\"data row18 col6\" >59</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col7\" class=\"data row18 col7\" >244</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col8\" class=\"data row18 col8\" >61</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col9\" class=\"data row18 col9\" >105</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col10\" class=\"data row18 col10\" >62</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col11\" class=\"data row18 col11\" >71</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col12\" class=\"data row18 col12\" >235</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col13\" class=\"data row18 col13\" >167</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col14\" class=\"data row18 col14\" >98</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col15\" class=\"data row18 col15\" >280</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col16\" class=\"data row18 col16\" >137</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col17\" class=\"data row18 col17\" >160</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col18\" class=\"data row18 col18\" >1814</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row18_col19\" class=\"data row18 col19\" >499</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73level0_row19\" class=\"row_heading level0 row19\" >machine-learning</th>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col0\" class=\"data row19 col0\" >139</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col1\" class=\"data row19 col1\" >89</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col2\" class=\"data row19 col2\" >61</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col3\" class=\"data row19 col3\" >123</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col4\" class=\"data row19 col4\" >63</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col5\" class=\"data row19 col5\" >99</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col6\" class=\"data row19 col6\" >119</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col7\" class=\"data row19 col7\" >62</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col8\" class=\"data row19 col8\" >71</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col9\" class=\"data row19 col9\" >131</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col10\" class=\"data row19 col10\" >124</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col11\" class=\"data row19 col11\" >113</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col12\" class=\"data row19 col12\" >188</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col13\" class=\"data row19 col13\" >106</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col14\" class=\"data row19 col14\" >259</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col15\" class=\"data row19 col15\" >195</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col16\" class=\"data row19 col16\" >366</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col17\" class=\"data row19 col17\" >429</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col18\" class=\"data row19 col18\" >499</td>\n",
       "                        <td id=\"T_978e29aa_8ee0_11ea_bec1_bffd320a9d73row19_col19\" class=\"data row19 col19\" >2693</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x7f2f93530b90>"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "relations_most_used = associations.loc[most_used.index, most_used.index]\n",
    "\n",
    "def style_cells(x):\n",
    "    helper_df = pd.DataFrame('', index=x.index, columns=x.columns)\n",
    "    helper_df.loc[\"time-series\", \"r\"] = \"background-color: yellow\"\n",
    "    helper_df.loc[\"r\", \"time-series\"] = \"background-color: yellow\"\n",
    "    for k in range(helper_df.shape[0]):\n",
    "        helper_df.iloc[k,k] = \"color: blue\"\n",
    "    \n",
    "    return helper_df\n",
    "\n",
    "relations_most_used.style.apply(style_cells, axis=None)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The cells highlighted in yellow tell us that `time-series` was used together with `r` 22 times. The values in blue tell us how many times each of the tags was used. We saw earlier that `machine-learning` was used 2693 times and we confirm it in this dataframe.\n",
    "\n",
    "It's hard for a human to understand what is going on in this dataframe. Let's create a heatmap. But before we do it, let's get rid of the values in blue, otherwise the colors will be too skewed."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in range(relations_most_used.shape[0]):\n",
    "    relations_most_used.iloc[i,i] = pd.np.NaN"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f2f936807d0>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 43044 characters]\n",
      "text/plain": [
       "<Figure size 864x576 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(12,8))\n",
    "sns.heatmap(relations_most_used, cmap=\"Greens\", annot=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The most used tags also seem to have the strongest relationships, as given by the dark concentration in the bottom right corner. However, this could simply be because each of these tags is used a lot, and so end up being used together a lot without possibly even having any strong relation between them.\n",
    "\n",
    "A more intuitive manifestation of this phenomenon is the following. A lot of people buy bread, a lot of people buy toilet paper, so they end up being purchased together a lot, but purchasing one of them doesn't increase the chances of purchasing the other."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Another shortcoming of this attempt is that it only looks at relations between pairs of tags and not between multiple groups of tags. For example, it could be the case that when used together, `dataset` and `scikit-learn` have a \"strong\" relation to `pandas`, but each by itself doesn't.\n",
    "\n",
    "So how do we attack both these problems? There is a powerful data mining technique that allows us to handle this: [association rules](https://en.wikipedia.org/wiki/Association_rule_learning). Association rules allow us to analytically spot relations like \"people who purchase milk, also purchase eggs\". Moreover, we can also measure how strong this relations are on several fronts: how common the relation is, how strong it is, and how independent the components of the relationship are (toilet paper and bread are probably more independent than eggs and milk — you'll learn more about [statistical independence](https://en.wikipedia.org/wiki/Independence_(probability_theory)) in the next step).\n",
    "\n",
    "\n",
    "We won't get into the details of it, as the technique is out of scope for this course, but it is a path worth investigating!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Enter Domain Knowledge\n",
    "\n",
    "[Keras](https://keras.io/), [scikit-learn](https://scikit-learn.org/), [TensorFlow](https://www.tensorflow.org/) are all Python libraries that allow their users to employ deep learning (a type of neural network).\n",
    "\n",
    "Most of the top tags are all intimately related with one central machine learning theme: deep learning. If we want to be very specific, we can suggest the creation of Python content that uses deep learning for classification problems (and other variations of this suggestion).\n",
    "\n",
    "At the glance of an eye, someone with sufficient domain knowledge can tell that the most popular topic at the moment, as shown by our analysis, is deep learning."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Just a Fad?\n",
    "\n",
    "Let's read in the file into a dataframe called `all_q`. We'll parse the dates at read-time."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "all_q = pd.read_csv(\"all_questions.csv\", parse_dates=[\"CreationDate\"])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can use the same technique as before to clean the tags column."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "all_q[\"Tags\"] = all_q[\"Tags\"].str.replace(\"^<|>$\", \"\").str.split(\"><\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Before deciding which questions should be classified as being deep learning questions, we should decide what tags are deep learning tags.\n",
    "\n",
    "The definition of what constitutes a deep learning tag we'll use is: a tag that belongs to the list `[\"lstm\", \"cnn\", \"scikit-learn\", \"tensorflow\", \"keras\", \"neural-network\", \"deep-learning\"]`.\n",
    "\n",
    "This list was obtained by looking at all the tags in `most_used` and seeing which ones had any relation to deep learning. You can use Google and read the tags descriptions to reach similar results.\n",
    "\n",
    "We'll now create a function that assigns `1` to deep learning questions and `0` otherwise; and we use it."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "def class_deep_learning(tags):\n",
    "    for tag in tags:\n",
    "        if tag in [\"lstm\", \"cnn\", \"scikit-learn\", \"tensorflow\",\n",
    "                   \"keras\", \"neural-network\", \"deep-learning\"]:\n",
    "            return 1\n",
    "    return 0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "all_q[\"DeepLearning\"] = all_q[\"Tags\"].apply(class_deep_learning)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "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>Id</th>\n",
       "      <th>CreationDate</th>\n",
       "      <th>Tags</th>\n",
       "      <th>DeepLearning</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>15231</th>\n",
       "      <td>44675</td>\n",
       "      <td>2019-01-28 06:20:18</td>\n",
       "      <td>[model-selection]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>440</th>\n",
       "      <td>55639</td>\n",
       "      <td>2019-07-14 11:45:43</td>\n",
       "      <td>[machine-learning, dataset, machine-learning-m...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11720</th>\n",
       "      <td>51523</td>\n",
       "      <td>2019-05-07 04:57:35</td>\n",
       "      <td>[neural-network, gradient-descent, batch-norma...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6262</th>\n",
       "      <td>27232</td>\n",
       "      <td>2018-01-30 09:53:38</td>\n",
       "      <td>[python, convergence]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19292</th>\n",
       "      <td>64930</td>\n",
       "      <td>2019-12-16 14:38:17</td>\n",
       "      <td>[neural-network, deep-learning, keras, convolu...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Id        CreationDate  \\\n",
       "15231  44675 2019-01-28 06:20:18   \n",
       "440    55639 2019-07-14 11:45:43   \n",
       "11720  51523 2019-05-07 04:57:35   \n",
       "6262   27232 2018-01-30 09:53:38   \n",
       "19292  64930 2019-12-16 14:38:17   \n",
       "\n",
       "                                                    Tags  DeepLearning  \n",
       "15231                                  [model-selection]             0  \n",
       "440    [machine-learning, dataset, machine-learning-m...             0  \n",
       "11720  [neural-network, gradient-descent, batch-norma...             1  \n",
       "6262                               [python, convergence]             0  \n",
       "19292  [neural-network, deep-learning, keras, convolu...             1  "
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "all_q.sample(5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Looks good!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The data-science-techonology landscape isn't something as dynamic to merit daily, weekly, or even monthly tracking. Let's track it quarterly.\n",
    "\n",
    "Since we don't have all the data for the first quarter of 2020, we'll get rid of those dates:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "all_q = all_q[all_q[\"CreationDate\"].dt.year < 2020]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's create a column that identifies the quarter in which a question was asked."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "def fetch_quarter(datetime):\n",
    "    year = str(datetime.year)[-2:]\n",
    "    quarter = str(((datetime.month-1) // 3) + 1)\n",
    "    return \"{y}Q{q}\".format(y=year, q=quarter)\n",
    "\n",
    "all_q[\"Quarter\"] = all_q[\"CreationDate\"].apply(fetch_quarter)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "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>Id</th>\n",
       "      <th>CreationDate</th>\n",
       "      <th>Tags</th>\n",
       "      <th>DeepLearning</th>\n",
       "      <th>Quarter</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>45416</td>\n",
       "      <td>2019-02-12 00:36:29</td>\n",
       "      <td>[python, keras, tensorflow, cnn, probability]</td>\n",
       "      <td>1</td>\n",
       "      <td>19Q1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>45418</td>\n",
       "      <td>2019-02-12 00:50:39</td>\n",
       "      <td>[neural-network]</td>\n",
       "      <td>1</td>\n",
       "      <td>19Q1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>45422</td>\n",
       "      <td>2019-02-12 04:40:51</td>\n",
       "      <td>[python, ibm-watson, chatbot]</td>\n",
       "      <td>0</td>\n",
       "      <td>19Q1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>45426</td>\n",
       "      <td>2019-02-12 04:51:49</td>\n",
       "      <td>[keras]</td>\n",
       "      <td>1</td>\n",
       "      <td>19Q1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>45427</td>\n",
       "      <td>2019-02-12 05:08:24</td>\n",
       "      <td>[r, predictive-modeling, machine-learning-mode...</td>\n",
       "      <td>0</td>\n",
       "      <td>19Q1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Id        CreationDate  \\\n",
       "0  45416 2019-02-12 00:36:29   \n",
       "1  45418 2019-02-12 00:50:39   \n",
       "2  45422 2019-02-12 04:40:51   \n",
       "3  45426 2019-02-12 04:51:49   \n",
       "4  45427 2019-02-12 05:08:24   \n",
       "\n",
       "                                                Tags  DeepLearning Quarter  \n",
       "0      [python, keras, tensorflow, cnn, probability]             1    19Q1  \n",
       "1                                   [neural-network]             1    19Q1  \n",
       "2                      [python, ibm-watson, chatbot]             0    19Q1  \n",
       "3                                            [keras]             1    19Q1  \n",
       "4  [r, predictive-modeling, machine-learning-mode...             0    19Q1  "
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "all_q.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For the final stretch of this screen, we'll group by quarter and:\n",
    "\n",
    "* Count the number of deep learning questions.\n",
    "* Count the total number of questions.\n",
    "* Compute the ratio between the two numbers above."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "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>Quarter</th>\n",
       "      <th>DeepLearningQuestions</th>\n",
       "      <th>TotalQuestions</th>\n",
       "      <th>DeepLearningRate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18Q3</td>\n",
       "      <td>685</td>\n",
       "      <td>1512</td>\n",
       "      <td>0.453042</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>16Q1</td>\n",
       "      <td>110</td>\n",
       "      <td>516</td>\n",
       "      <td>0.213178</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>15Q4</td>\n",
       "      <td>66</td>\n",
       "      <td>382</td>\n",
       "      <td>0.172775</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>19Q4</td>\n",
       "      <td>809</td>\n",
       "      <td>2036</td>\n",
       "      <td>0.397348</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>16Q3</td>\n",
       "      <td>161</td>\n",
       "      <td>585</td>\n",
       "      <td>0.275214</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Quarter  DeepLearningQuestions  TotalQuestions  DeepLearningRate\n",
       "17    18Q3                    685            1512          0.453042\n",
       "7     16Q1                    110             516          0.213178\n",
       "6     15Q4                     66             382          0.172775\n",
       "22    19Q4                    809            2036          0.397348\n",
       "9     16Q3                    161             585          0.275214"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "quarterly = all_q.groupby('Quarter').agg({\"DeepLearning\": ['sum', 'size']})\n",
    "quarterly.columns = ['DeepLearningQuestions', 'TotalQuestions']\n",
    "quarterly[\"DeepLearningRate\"] = quarterly[\"DeepLearningQuestions\"]\\\n",
    "                                /quarterly[\"TotalQuestions\"]\n",
    "# The following is done to help with visualizations later.\n",
    "quarterly.reset_index(inplace=True)\n",
    "quarterly.sample(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 61964 characters]\n",
      "text/plain": [
       "<Figure size 1728x864 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "ax1 = quarterly.plot(x=\"Quarter\", y=\"DeepLearningRate\",\n",
    "                    kind=\"line\", linestyle=\"-\", marker=\"o\", color=\"orange\",\n",
    "                    figsize=(24,12)\n",
    "                    )\n",
    "\n",
    "ax2 = quarterly.plot(x=\"Quarter\", y=\"TotalQuestions\",\n",
    "                     kind=\"bar\", ax=ax1, secondary_y=True, alpha=0.7, rot=45)\n",
    "\n",
    "for idx, t in enumerate(quarterly[\"TotalQuestions\"]):\n",
    "    ax2.text(idx, t, str(t), ha=\"center\", va=\"bottom\")\n",
    "xlims = ax1.get_xlim()\n",
    "\n",
    "ax1.get_legend().remove()\n",
    "\n",
    "handles1, labels1 = ax1.get_legend_handles_labels()\n",
    "handles2, labels2 = ax2.get_legend_handles_labels()\n",
    "ax1.legend(handles=handles1 + handles2,\n",
    "           labels=labels1 + labels2,\n",
    "           loc=\"upper left\", prop={\"size\": 12})\n",
    "\n",
    "\n",
    "for ax in (ax1, ax2):\n",
    "    for where in (\"top\", \"right\"):\n",
    "        ax.spines[where].set_visible(False)\n",
    "        ax.tick_params(right=False, labelright=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It seems that deep learning questions was a high-growth trend since the start of DSSE and it looks like it is plateauing. There is no evidence to suggest that interest in deep learning is decreasing and so we maintain our previous idea of proposing that we create deep learning content."
   ]
  }
 ],
 "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.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
