Skip to content

Instantly share code, notes, and snippets.

@wtberry
Created July 7, 2019 01:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wtberry/2988ed9f85d84c610b54523f03445035 to your computer and use it in GitHub Desktop.
Save wtberry/2988ed9f85d84c610b54523f03445035 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Egyptian:\n",
" code name\n",
"0 Arabic (Egypt) Adam Rogers\n",
"1 Arabic (Egypt) Sandra Garcia\n",
"2 Arabic (Egypt) Anthony Mcdonald\n",
"3 Arabic (Egypt) Jordan Cohen\n",
"4 Arabic (Egypt) Cody Wilson\n",
"\n",
"American:\n",
" code name\n",
"10000 English (United States) Ashley Scott\n",
"10001 English (United States) Betty Smith\n",
"10002 English (United States) Dylan Harris\n",
"10003 English (United States) Andrew Vargas\n",
"10004 English (United States) Jillian Lewis\n"
]
}
],
"source": [
"## Peek into the training data\n",
"df = pd.read_csv('data/multi_class_names.csv')\n",
"Eg, US = df['code'].unique()[0], df['code'].unique()[1]\n",
"print('Egyptian:\\n', df[df['code'] == Eg].head(5))\n",
"print('\\nAmerican:\\n', df[df['code'] == US].head(5))"
]
}
],
"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.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment