-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStep_3.qmd
More file actions
50 lines (40 loc) · 867 Bytes
/
Copy pathStep_3.qmd
File metadata and controls
50 lines (40 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: "Untitled"
format: html
editor: visual
jupyter: python3
---
## Numpy
```{python}
import numpy
```
```{python}
num_array1 = numpy.array([1,2,3,4])
num_array2 = numpy.array([5,6,7,8])
```
```{python}
type(num_array1)
```
```{python}
num_array1 + num_array2
num_array1/num_array2
num_array1**num_array2
num_array1-num_array2
```
```{python}
num_array1.mean()
num_array1.min()
num_array.std()
num_array.max()
```
```{python}
numpy.log10(num_array1)
```
Numpy é uma biblioteca que serve para você fazer contas com vetores, métodos matemáticos, enquanto o Pandas é uma biblioteca de manipulação de dados, então ela define o DataFrame e um milhão de métodos para mexer no DataFrame, tipo o statsModels é a biblioteca de estatística do Python.
```{python}
num_array1.astype("str")
num_array1.astype("int")
```
```{python}
num_array1.dtype
```