Explorando a base table
Antes de começar a construir o modelo, é importante entender os dados com que você está trabalhando. Neste exercício, você vai aprender a obter o tamanho da população, o número de targets e a incidência do target a partir de uma basetable fornecida.
Este exercício faz parte do curso
Introdução à Análise Preditiva em Python
Instruções do exercício
- A basetable está carregada em um objeto do pandas
basetable. Atribua o número de linhas à variávelpopulation_sizee imprima. - Atribua o número de targets iguais a um à variável
targets_counte imprima. - Imprima a incidência do target, que é a razão entre
targets_countepopulation_size.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Assign the number of rows in the basetable to the variable 'population_size'.
population_size = ____(____)
# Print the population size.
print(____)
# Assign the number of targets to the variable 'targets_count'.
targets_count = ____(____[____])
# Print the number of targets.
print(____)
# Print the target incidence.
print(____ / ____)