Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercicio S11 Paloma Avena #4

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
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
40 changes: 40 additions & 0 deletions exercicios/para-casa/exercicio_paloma.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Utilizar a tabela de dados do clima de seu estado, manipule os dados de acordo com as instruções abaixo:
Utilizei a planilha do debate - Bonito

```python
import pandas as pd
df = pd.read_csv('INMET_CO_MS_S704_BONITO_01-01-2020_A_31-12-2020.CSV', delimiter=';', skiprows=8, encoding='latin1')
df.head()
```

- calcular a média da temperatura da amostra

```python
coluna_temperatura = df['TEMPERATURA DO AR - BULBO SECO, HORARIA (°C)']
coluna_temperatura = pd.to_numeric(df['TEMPERATURA DO AR - BULBO SECO, HORARIA (°C)'], errors='coerce')
coluna_temperatura.mean()
```

- retirar nulos da coluna 'RADIACAO GLOBAL (Kj/m2)'

```python
df_sem_nulos_colunas = df.dropna(axis=1)
```

- copiar o dataframe reduzindo para 3 colunas (a sua escolha) e 1000 linhas (aleatórias)

```python
df_reduzido = df[['Data', 'PRECIPITAÇÃO TOTAL, HORÁRIO (mm)']]
df_reduzido.head()
amostra = df.sample(n=1000)
```

- Bônus: normalizar coluna (qualquer uma)

```python
df['Coluna1_normalizada'] = (df['UMIDADE REL. MAX. NA HORA ANT. (AUT) (%)'] - df['UMIDADE REL. MAX. NA HORA ANT. (AUT) (%)'].min()) / (df['UMIDADE REL. MAX. NA HORA ANT. (AUT) (%)'].max() - df['UMIDADE REL. MAX. NA HORA ANT. (AUT) (%)'].min())
```

- Bônus II: pesquisar sobre outras formas de processamento de dados além das vistas em sala de aula


26 changes: 26 additions & 0 deletions exercicios/para-casa/exercicio_s11.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}


8,793 changes: 8,793 additions & 0 deletions exercicios/para-sala/INMET_CO_MS_S704_BONITO_01-01-2020_A_31-12-2020.CSV

Large diffs are not rendered by default.

Loading