Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions 04.Filtering Data/1.Filter a Dataframe Based on 1 Condition.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"cells": [
{
"cell_type": "code",
"execution_count": 9,
"id": "acee6c9f",
"execution_count": null,
"id": "7e1b78c3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -12,14 +12,12 @@
},
{
"cell_type": "code",
"execution_count": 10,
"id": "5349f28e",
"metadata": {
"scrolled": false
},
"execution_count": null,
"id": "226ff072",
"metadata": {},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down Expand Up @@ -1089,7 +1087,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -1103,7 +1101,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.13.5"
},
"toc": {
"base_numbering": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"id": "932b054d",
"metadata": {},
"outputs": [],
Expand All @@ -12,19 +12,19 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "af2b9d82",
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "1d57c715",
"metadata": {
"scrolled": true
Expand Down Expand Up @@ -141,7 +141,7 @@
"2 575.00 "
]
},
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -160,7 +160,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "25857fac",
"metadata": {},
"outputs": [],
Expand All @@ -178,7 +178,7 @@
"data": {
"text/plain": [
"array(['Inexpensive', 'Inexpensive', 'Inexpensive', ..., 'Inexpensive',\n",
" 'Inexpensive', 'Inexpensive'], dtype='<U11')"
" 'Inexpensive', 'Inexpensive'], shape=(1303,), dtype='<U11')"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -389,7 +389,7 @@
"Price_tier\n",
"Inexpensive 1166\n",
"Expensive 137\n",
"dtype: int64"
"Name: count, dtype: int64"
]
},
"execution_count": 9,
Expand All @@ -412,17 +412,18 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 10,
"id": "875f31cc",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array(['Small', 'Small', 'Big', ..., 'Small', 'Big', 'Big'], dtype='<U5')"
"array(['Small', 'Small', 'Big', ..., 'Small', 'Big', 'Big'],\n",
" shape=(1303,), dtype='<U5')"
]
},
"execution_count": 13,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -434,7 +435,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 11,
"id": "078b29c2",
"metadata": {},
"outputs": [],
Expand All @@ -445,7 +446,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 12,
"id": "c6e3cffa",
"metadata": {
"scrolled": false
Expand Down Expand Up @@ -614,7 +615,7 @@
"4 1803.60 Inexpensive Small "
]
},
"execution_count": 16,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -626,7 +627,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 13,
"id": "905ea459",
"metadata": {},
"outputs": [
Expand All @@ -636,10 +637,10 @@
"Scren_size\n",
"Big 835\n",
"Small 468\n",
"dtype: int64"
"Name: count, dtype: int64"
]
},
"execution_count": 17,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -652,7 +653,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -666,7 +667,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.13.5"
},
"toc": {
"base_numbering": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "5349f28e",
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down Expand Up @@ -1665,7 +1665,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -1679,7 +1679,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.13.5"
},
"toc": {
"base_numbering": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "5349f28e",
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down Expand Up @@ -936,7 +936,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -950,7 +950,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.13.5"
},
"toc": {
"base_numbering": 1,
Expand Down
4 changes: 2 additions & 2 deletions 04.Filtering Data/5.The .isin() Method.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "5349f28e",
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "5349f28e",
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "5349f28e",
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "5349f28e",
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@
},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv')"
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "087faadb",
"metadata": {},
"outputs": [],
"source": [
"df_laptops = pd.read_csv('laptop_price.csv', encoding='latin1')"
]
},
{
Expand Down