Skip to content

Commit c4ff758

Browse files
committed
update dos códigos
1 parent 632f80f commit c4ff758

File tree

2 files changed

+6
-49
lines changed

2 files changed

+6
-49
lines changed

Customer_Profile_Analysis.ipynb

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 7,
5+
"execution_count": 15,
66
"id": "3b79c8b2",
77
"metadata": {},
88
"outputs": [
@@ -211,55 +211,10 @@
211211
},
212212
{
213213
"cell_type": "code",
214-
"execution_count": 14,
214+
"execution_count": 18,
215215
"id": "fd349d9b",
216216
"metadata": {},
217217
"outputs": [
218-
{
219-
"data": {
220-
"text/html": [
221-
"<div>\n",
222-
"<style scoped>\n",
223-
" .dataframe tbody tr th:only-of-type {\n",
224-
" vertical-align: middle;\n",
225-
" }\n",
226-
"\n",
227-
" .dataframe tbody tr th {\n",
228-
" vertical-align: top;\n",
229-
" }\n",
230-
"\n",
231-
" .dataframe thead th {\n",
232-
" text-align: right;\n",
233-
" }\n",
234-
"</style>\n",
235-
"<table border=\"1\" class=\"dataframe\">\n",
236-
" <thead>\n",
237-
" <tr style=\"text-align: right;\">\n",
238-
" <th></th>\n",
239-
" <th>ClienteID</th>\n",
240-
" <th>Origem</th>\n",
241-
" <th>Idade</th>\n",
242-
" <th>Salário Anual (R$)</th>\n",
243-
" <th>Nota (1-100)</th>\n",
244-
" <th>Profissão</th>\n",
245-
" <th>Experiência Trabalho</th>\n",
246-
" <th>Tamanho Família</th>\n",
247-
" </tr>\n",
248-
" </thead>\n",
249-
" <tbody>\n",
250-
" </tbody>\n",
251-
"</table>\n",
252-
"</div>"
253-
],
254-
"text/plain": [
255-
"Empty DataFrame\n",
256-
"Columns: [ClienteID, Origem, Idade, Salário Anual (R$), Nota (1-100), Profissão, Experiência Trabalho, Tamanho Família]\n",
257-
"Index: []"
258-
]
259-
},
260-
"metadata": {},
261-
"output_type": "display_data"
262-
},
263218
{
264219
"name": "stdout",
265220
"output_type": "stream",
@@ -286,7 +241,6 @@
286241
"source": [
287242
"#Passo 3: Tratamento de dados\n",
288243
"tabela[\"Salário Anual (R$)\"] = pd.to_numeric(tabela[\"Salário Anual (R$)\"], errors=\"coerce\")\n",
289-
"display(tabela[tabela[\"Profissão\"].isna()])\n",
290244
"tabela = tabela.dropna()\n",
291245
"print(tabela.info())"
292246
]

Customer_Profile_Analysis.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@
88
display(tabela)
99

1010

11+
1112
#Passo 3: Tratamento de dados
1213
tabela["Salário Anual (R$)"] = pd.to_numeric(tabela["Salário Anual (R$)"], errors="coerce")
13-
display(tabela[tabela["Profissão"].isna()])
1414
tabela = tabela.dropna()
1515
print(tabela.info())
1616

1717

18+
1819
#Passo 4: Análise inicial -> entender as notas do clientes (avaliar a média como parâmetro)
1920
display(tabela.describe())
2021
#A média das notas é de em torno de 52 (principal parâmetro de comparação)
2122

2223

24+
2325
#Passo 5: Análise completa -> entender como a característica do cliente impacta na nota
2426
import plotly.express as px
2527

@@ -31,6 +33,7 @@
3133
grafico.show()
3234

3335

36+
3437
#Correção de problema de exibição dos gráficos
3538
import plotly.io as pio
3639

0 commit comments

Comments
 (0)