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
3,381 changes: 3,381 additions & 0 deletions exercicios/para-casa/ativ-carol/atividade_semana_14.ipynb

Large diffs are not rendered by default.

48,536 changes: 48,536 additions & 0 deletions exercicios/para-casa/ativ-carol/base_atividade_s14_olist.csv

Large diffs are not rendered by default.

103,887 changes: 103,887 additions & 0 deletions exercicios/para-casa/ativ-carol/datasets_olist/olist_order_payments_dataset.csv

Large diffs are not rendered by default.

104,720 changes: 104,720 additions & 0 deletions exercicios/para-casa/ativ-carol/datasets_olist/olist_order_reviews_dataset.csv

Large diffs are not rendered by default.

99,442 changes: 99,442 additions & 0 deletions exercicios/para-casa/ativ-carol/datasets_olist/olist_orders_dataset.csv

Large diffs are not rendered by default.

395 changes: 395 additions & 0 deletions exercicios/para-sala/dinamica.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,395 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# importando os pacotes que iremos utilizar\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 3,
"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>User ID</th>\n",
" <th>Subscription Type</th>\n",
" <th>Monthly Revenue</th>\n",
" <th>Join Date</th>\n",
" <th>Last Payment Date</th>\n",
" <th>Country</th>\n",
" <th>Age</th>\n",
" <th>Gender</th>\n",
" <th>Device</th>\n",
" <th>Plan Duration</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>Basic</td>\n",
" <td>10</td>\n",
" <td>15-01-22</td>\n",
" <td>10-06-23</td>\n",
" <td>United States</td>\n",
" <td>28</td>\n",
" <td>Male</td>\n",
" <td>Smartphone</td>\n",
" <td>1 Month</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>Premium</td>\n",
" <td>15</td>\n",
" <td>05-09-21</td>\n",
" <td>22-06-23</td>\n",
" <td>Canada</td>\n",
" <td>35</td>\n",
" <td>Female</td>\n",
" <td>Tablet</td>\n",
" <td>1 Month</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>Standard</td>\n",
" <td>12</td>\n",
" <td>28-02-23</td>\n",
" <td>27-06-23</td>\n",
" <td>United Kingdom</td>\n",
" <td>42</td>\n",
" <td>Male</td>\n",
" <td>Smart TV</td>\n",
" <td>1 Month</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>Standard</td>\n",
" <td>12</td>\n",
" <td>10-07-22</td>\n",
" <td>26-06-23</td>\n",
" <td>Australia</td>\n",
" <td>51</td>\n",
" <td>Female</td>\n",
" <td>Laptop</td>\n",
" <td>1 Month</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>Basic</td>\n",
" <td>10</td>\n",
" <td>01-05-23</td>\n",
" <td>28-06-23</td>\n",
" <td>Germany</td>\n",
" <td>33</td>\n",
" <td>Male</td>\n",
" <td>Smartphone</td>\n",
" <td>1 Month</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2495</th>\n",
" <td>2496</td>\n",
" <td>Premium</td>\n",
" <td>14</td>\n",
" <td>25-07-22</td>\n",
" <td>12-07-23</td>\n",
" <td>Spain</td>\n",
" <td>28</td>\n",
" <td>Female</td>\n",
" <td>Smart TV</td>\n",
" <td>1 Month</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2496</th>\n",
" <td>2497</td>\n",
" <td>Basic</td>\n",
" <td>15</td>\n",
" <td>04-08-22</td>\n",
" <td>14-07-23</td>\n",
" <td>Spain</td>\n",
" <td>33</td>\n",
" <td>Female</td>\n",
" <td>Smart TV</td>\n",
" <td>1 Month</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2497</th>\n",
" <td>2498</td>\n",
" <td>Standard</td>\n",
" <td>12</td>\n",
" <td>09-08-22</td>\n",
" <td>15-07-23</td>\n",
" <td>United States</td>\n",
" <td>38</td>\n",
" <td>Male</td>\n",
" <td>Laptop</td>\n",
" <td>1 Month</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2498</th>\n",
" <td>2499</td>\n",
" <td>Standard</td>\n",
" <td>13</td>\n",
" <td>12-08-22</td>\n",
" <td>12-07-23</td>\n",
" <td>Canada</td>\n",
" <td>48</td>\n",
" <td>Female</td>\n",
" <td>Tablet</td>\n",
" <td>1 Month</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2499</th>\n",
" <td>2500</td>\n",
" <td>Basic</td>\n",
" <td>15</td>\n",
" <td>13-08-22</td>\n",
" <td>12-07-23</td>\n",
" <td>United States</td>\n",
" <td>35</td>\n",
" <td>Female</td>\n",
" <td>Smart TV</td>\n",
" <td>1 Month</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>2500 rows × 10 columns</p>\n",
"</div>"
],
"text/plain": [
" User ID Subscription Type Monthly Revenue Join Date Last Payment Date \\\n",
"0 1 Basic 10 15-01-22 10-06-23 \n",
"1 2 Premium 15 05-09-21 22-06-23 \n",
"2 3 Standard 12 28-02-23 27-06-23 \n",
"3 4 Standard 12 10-07-22 26-06-23 \n",
"4 5 Basic 10 01-05-23 28-06-23 \n",
"... ... ... ... ... ... \n",
"2495 2496 Premium 14 25-07-22 12-07-23 \n",
"2496 2497 Basic 15 04-08-22 14-07-23 \n",
"2497 2498 Standard 12 09-08-22 15-07-23 \n",
"2498 2499 Standard 13 12-08-22 12-07-23 \n",
"2499 2500 Basic 15 13-08-22 12-07-23 \n",
"\n",
" Country Age Gender Device Plan Duration \n",
"0 United States 28 Male Smartphone 1 Month \n",
"1 Canada 35 Female Tablet 1 Month \n",
"2 United Kingdom 42 Male Smart TV 1 Month \n",
"3 Australia 51 Female Laptop 1 Month \n",
"4 Germany 33 Male Smartphone 1 Month \n",
"... ... ... ... ... ... \n",
"2495 Spain 28 Female Smart TV 1 Month \n",
"2496 Spain 33 Female Smart TV 1 Month \n",
"2497 United States 38 Male Laptop 1 Month \n",
"2498 Canada 48 Female Tablet 1 Month \n",
"2499 United States 35 Female Smart TV 1 Month \n",
"\n",
"[2500 rows x 10 columns]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_netflix = pd.read_csv('netflix.csv')\n",
"df_netflix"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Valores nulos por coluna do dataframe:\n"
]
},
{
"data": {
"text/plain": [
"User ID 0\n",
"Subscription Type 0\n",
"Monthly Revenue 0\n",
"Join Date 0\n",
"Last Payment Date 0\n",
"Country 0\n",
"Age 0\n",
"Gender 0\n",
"Device 0\n",
"Plan Duration 0\n",
"dtype: int64"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"print(\"Valores nulos por coluna do dataframe:\")\n",
"df_netflix.isnull().sum() "
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 Male\n",
"1 Female\n",
"2 Male\n",
"3 Female\n",
"4 Male\n",
" ... \n",
"2495 Female\n",
"2496 Female\n",
"2497 Male\n",
"2498 Female\n",
"2499 Female\n",
"Name: Gender, Length: 2500, dtype: object"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_netflix['Gender']"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 28\n",
"1 35\n",
"2 42\n",
"3 51\n",
"4 33\n",
" ..\n",
"2495 28\n",
"2496 33\n",
"2497 38\n",
"2498 48\n",
"2499 35\n",
"Name: Age, Length: 2500, dtype: int64"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_netflix['Age']"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 2500 entries, 0 to 2499\n",
"Data columns (total 10 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 User ID 2500 non-null int64 \n",
" 1 Subscription Type 2500 non-null object\n",
" 2 Monthly Revenue 2500 non-null int64 \n",
" 3 Join Date 2500 non-null object\n",
" 4 Last Payment Date 2500 non-null object\n",
" 5 Country 2500 non-null object\n",
" 6 Age 2500 non-null int64 \n",
" 7 Gender 2500 non-null object\n",
" 8 Device 2500 non-null object\n",
" 9 Plan Duration 2500 non-null object\n",
"dtypes: int64(3), object(7)\n",
"memory usage: 195.4+ KB\n"
]
}
],
"source": [
"df_netflix.info()"
]
}
],
"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.12.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading