{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "from nltk.corpus import stopwords" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "table = pd.read_csv(\"emoji_descriptions.csv\", names=(\"id\",\"char\", \"description\"))" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
idchardescription
NaNcodecharacterdescripion,
0.0126980๐Ÿ€„MAHJONG TILE RED DRAGON
1.0129525๐ŸงตSPOOL OF THREAD
2.0129526๐ŸงถBALL OF YARN
3.0127183๐ŸƒPLAYING CARD BLACK JOKER
\n", "
" ], "text/plain": [ " id char description\n", "NaN code character descripion,\n", " 0.0 126980 ๐Ÿ€„ MAHJONG TILE RED DRAGON\n", " 1.0 129525 ๐Ÿงต SPOOL OF THREAD\n", " 2.0 129526 ๐Ÿงถ BALL OF YARN\n", " 3.0 127183 ๐Ÿƒ PLAYING CARD BLACK JOKER" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "table.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "prepStep1Table = table\n", "print(table[3])\n", "# lowercasing\n", "#for entry in table[\"description\"][1:]:\n", " # prepStep1Table[\"description\"][entry] = table[\"description\"][entry].toLower()\n", "#print(prepStep1Table)\n", "#stopword removal\n", "#for entry in prepStep1Table[\"description\"][1:]:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "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.6.4" } }, "nbformat": 4, "nbformat_minor": 2 }