<jupyter_start><jupyter_text>Ciência de dados!!!---* Vamos começar praticando!  Vamos começar praticando!!!---Vamos utilizar o pandas, numpy e matplotlib! * Importações<jupyter_code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>* Lendo o nosso arquivo csv<jupyter_code>paises = pd.read_csv('../dados/countries.csv')
paises.head()<jupyter_output><empty_output><jupyter_text>* Vamos verificar o dataframe<jupyter_code>type(paises)<jupyter_output><empty_output><jupyter_text>* Vericando as colunas<jupyter_code>paises.columns
for coluna in paises.columns:
    print(coluna)<jupyter_output>country
year
population<jupyter_text>* Verificando o index<jupyter_code>paises.index<jupyter_output><empty_output><jupyter_text>* Tamanho do dataset<jupyter_code>paises.shape
paises.shape[0]
paises.shape[1]<jupyter_output><empty_output><jupyter_text>* Verificar informações do dataset<jupyter_code>paises.info()<jupyter_output><class 'pandas.core.frame.DataFrame'>
RangeIndex: 1704 entries, 0 to 1703
Data columns (total 3 columns):
 #   Column      Non-Null Count  Dtype 
---  ------      --------------  ----- 
 0   country     1704 non-null   object
 1   year        1704 non-null   int64 
 2   population  1704 non-null   int64 
dtypes: int64(2), object(1)
memory usage: 40.1+ KB<jupyter_text>* Quantos países tem na coluna country ?<jupyter_code>paises
paises['country']
paises.country
type(paises.country)
paises.country.unique()
len(paises.country.unique())<jupyter_output><empty_output><jupyter_text>* O Brasil está na lista desses países ?<jupyter_code>'Brazil' in paises.country.unique()<jupyter_output><empty_output><jupyter_text>* Criando um dataframe apenas para o Brasil<jupyter_code>filtro = (paises.country == 'Brazil')
brasil = paises[filtro]
brasil
brasil.shape
x = brasil.year
y = brasil.population

plt.figure(figsize=(16, 8))
plt.title('Crescimento da população Brasileira entre a década de 50 e os anos 2000', fontsize=18)
plt.plot(x, y, color='navy', ls='--', label='População')
plt.xlabel('Anos', fontsize=14)
plt.ylabel('População', fontsize=14)
plt.legend()
plt.grid()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1315669255367748, 'fraction_numerical': 0.024211968935587025, 'mean_word_length': 6.087378640776699, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '87044', 'license': 'MIT', 'n_tokens_mistral': 878, 'n_tokens_neox': 819, 'n_words': 165, 'path': 'arquivos-aulas/cap-11-data-science/notebooks/.ipynb_checkpoints/cap 11 - data-science - 1-checkpoint.ipynb', 'repo_name': 'kitawarairon/curso-pyton-engenharia', 'size': '2189'}