{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Just Inspection Notebook\n",
"\n",
"Different from `z_clean_data.py`"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" book_name | \n",
" summaries | \n",
" categories | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" The Highly Sensitive Person | \n",
" is a self-assessment guide and how-to-live tem... | \n",
" science | \n",
"
\n",
" \n",
" 1 | \n",
" Why Has Nobody Told Me This Before? | \n",
" is a collection of a clinical psychologist’s ... | \n",
" science | \n",
"
\n",
" \n",
" 2 | \n",
" The Midnight Library | \n",
" tells the story of Nora, a depressed woman in... | \n",
" science | \n",
"
\n",
" \n",
" 3 | \n",
" Brave New World | \n",
" presents a futuristic society engineered perf... | \n",
" science | \n",
"
\n",
" \n",
" 4 | \n",
" 1984 | \n",
" is the story of a man questioning the system ... | \n",
" science | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" book_name \\\n",
"0 The Highly Sensitive Person \n",
"1 Why Has Nobody Told Me This Before? \n",
"2 The Midnight Library \n",
"3 Brave New World \n",
"4 1984 \n",
"\n",
" summaries categories \n",
"0 is a self-assessment guide and how-to-live tem... science \n",
"1 is a collection of a clinical psychologist’s ... science \n",
"2 tells the story of Nora, a depressed woman in... science \n",
"3 presents a futuristic society engineered perf... science \n",
"4 is the story of a man questioning the system ... science "
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from z_utils import get_dataframe \n",
"\n",
"books_df = get_dataframe(\"books_summary.csv\")\n",
"books_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" book_name | \n",
" summaries | \n",
" categories | \n",
"
\n",
" \n",
" \n",
" \n",
" 2 | \n",
" The Midnight Library | \n",
" tells the story of Nora, a depressed woman in... | \n",
" science | \n",
"
\n",
" \n",
" 522 | \n",
" The Midnight Library | \n",
" tells the story of Nora, a depressed woman in... | \n",
" relationships | \n",
"
\n",
" \n",
" 788 | \n",
" The Midnight Library | \n",
" tells the story of Nora, a depressed woman in... | \n",
" happiness | \n",
"
\n",
" \n",
" 1821 | \n",
" The Midnight Library | \n",
" tells the story of Nora, a depressed woman in... | \n",
" psychology | \n",
"
\n",
" \n",
" 2402 | \n",
" The Midnight Library | \n",
" tells the story of Nora, a depressed woman in... | \n",
" motivation | \n",
"
\n",
" \n",
" 3645 | \n",
" The Midnight Library | \n",
" tells the story of Nora, a depressed woman in... | \n",
" creativity | \n",
"
\n",
" \n",
" 3941 | \n",
" The Midnight Library | \n",
" tells the story of Nora, a depressed woman in... | \n",
" fiction | \n",
"
\n",
" \n",
" 4305 | \n",
" The Midnight Library | \n",
" tells the story of Nora, a depressed woman in... | \n",
" work | \n",
"
\n",
" \n",
" 4665 | \n",
" The Midnight Library | \n",
" tells the story of Nora, a depressed woman in... | \n",
" mindfulness | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" book_name summaries \\\n",
"2 The Midnight Library tells the story of Nora, a depressed woman in... \n",
"522 The Midnight Library tells the story of Nora, a depressed woman in... \n",
"788 The Midnight Library tells the story of Nora, a depressed woman in... \n",
"1821 The Midnight Library tells the story of Nora, a depressed woman in... \n",
"2402 The Midnight Library tells the story of Nora, a depressed woman in... \n",
"3645 The Midnight Library tells the story of Nora, a depressed woman in... \n",
"3941 The Midnight Library tells the story of Nora, a depressed woman in... \n",
"4305 The Midnight Library tells the story of Nora, a depressed woman in... \n",
"4665 The Midnight Library tells the story of Nora, a depressed woman in... \n",
"\n",
" categories \n",
"2 science \n",
"522 relationships \n",
"788 happiness \n",
"1821 psychology \n",
"2402 motivation \n",
"3645 creativity \n",
"3941 fiction \n",
"4305 work \n",
"4665 mindfulness "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"books_df[books_df[\"book_name\"] == \"The Midnight Library\"]"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"count 1230.000000\n",
"mean 4.042276\n",
"std 1.985669\n",
"min 1.000000\n",
"25% 3.000000\n",
"50% 4.000000\n",
"75% 5.000000\n",
"max 12.000000\n",
"Name: book_name, dtype: float64"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"books_df[\"book_name\"].value_counts().describe()"
]
},
{
"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.10.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}