<jupyter_start><jupyter_text>Importando biblioteca Pandas<jupyter_code>import pandas as pd<jupyter_output><empty_output><jupyter_text>Carregando o dataset na variável data<jupyter_code>data = pd.read_csv('datasets\kc_house_data.csv')<jupyter_output><empty_output><jupyter_text>Selecionando pelos nomes<jupyter_code>print(data[['id', 'date', 'price']])<jupyter_output><empty_output><jupyter_text>Selecionando pelos índices<jupyter_code>print(data.iloc[0:10, 1:4])<jupyter_output>date      price  bedrooms
0  20141013T000000   221900.0         3
1  20141209T000000   538000.0         3
2  20150225T000000   180000.0         2
3  20141209T000000   604000.0         4
4  20150218T000000   510000.0         3
5  20140512T000000  1225000.0         4
6  20140627T000000   257500.0         3
7  20150115T000000   291850.0         3
8  20150415T000000   229500.0         3
9  20150312T000000   323000.0         3<jupyter_text>Respondendo as perguntas de negócio Data do imóvel mais antigo<jupyter_code>data['date'] = pd.to_datetime(data['date'])
data.sort_values('date', ascending=True)<jupyter_output><empty_output><jupyter_text>Determinar o maior numero de andares e contar quantos temos por andar<jupyter_code>data['floors'].unique()

print(data.loc[data['floors'] == 3.5].shape)<jupyter_output>(8, 21)<jupyter_text>Criando classificação<jupyter_code>data['level'] = 'standard'

data.loc[data['price'] > 540000, 'level'] = 'high_level'
data.loc[data['price'] < 540000, 'level'] = 'low_level'

data.head()<jupyter_output><empty_output><jupyter_text>Relatório ordenado pelo preço<jupyter_code>report = data[['id', 'date', 'price', 'bedrooms', 'sqft_lot', 'level']].sort_values('price', ascending=False)
report.to_csv('datasets/report_aula02.csv', index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12352610892756878, 'fraction_numerical': 0.14317798989331837, 'mean_word_length': 5.75, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, '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': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '1220', 'license': 'MIT', 'n_tokens_mistral': 856, 'n_tokens_neox': 690, 'n_words': 110, 'path': 'aulas/aula2.ipynb', 'repo_name': 'artuguen28/Do_Zero_Ao_DS', 'size': '1781'}