일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Tkinter
- Mac
- Github
- SQL
- Java
- Google Excel
- c#
- hive
- string
- Excel
- 파이썬
- dataframe
- numpy
- google apps script
- Kotlin
- PostgreSQL
- matplotlib
- PANDAS
- django
- Redshift
- gas
- Python
- array
- Apache
- list
- math
- GIT
- Google Spreadsheet
- PySpark
- Today
- Total
목록Python (384)
달나라 노트
import numpy as np arr_1 = np.random.rand(5) print(arr_1) arr_2 = np.random.rand(5) print(arr_2) -- Result [0.64589411 0.43758721 0.891773 0.96366276 0.38344152] [0.79172504 0.52889492 0.56804456 0.92559664 0.07103606] numpy의 rand method로 랜덤한 숫자를 생성하면 위처럼 생성할때마다 다른 숫자가 return될겁니다. (같은 숫자가 return될 확률도 있지만 너무나도 적은 확률이겠죠.) import numpy as np np.random.seed(seed=0) arr_1 = np.random.rand(5) print(ar..

numpy에서는 sinh, cosh, tanh의 삼각함수도 제공합니다. import numpy as np value = np.sinh(3) print(value) value = np.cosh(3) print(value) value = np.tanh(3) print(value) -- Result 10.017874927409903 10.067661995777765 0.9950547536867305 사용법은 간단합니다. sinh, cosh, tanh method의 paramter로 어떤 값을 전달하면 그 값에 대한 sinh, cosh, tanh 값을 계산해줍니다. import numpy as np value_list = [1, 2, 3, 4, 5] value_arr = np.array([1, 2, 3, 4, ..
numpy의 sqrt는 어떤 수의 제곱근을 계산해줍니다. import numpy as np test_value = np.sqrt(1) print(test_value) test_value = np.sqrt(4) print(test_value) test_value = np.sqrt(9) print(test_value) -- Result 1.0 2.0 3.0 사용법은 간단합니다. 위처럼 그냥 어떤 값을 sqrt method의 parameter로 전달하면 그 값의 제곱근을 계산해줍니다. import numpy as np value_list = [1, 2, 4, 9, 16] result = np.sqrt(value_list) print(result) value_arr = [1, 2, 4, 9, 16] result..

maplotlib의 scatter method는 점 그래프를 그려줍니다. 쉽게말해 점과 점을 이어주는 선 없이 오로지 점만을 나타내줍니다. import matplotlib.pyplot as plt list_x = [1, 2, 3, 4, 5] list_y = [10, 30, 15, 20, 5] plt.scatter(list_x, list_y, marker='o', s=30, c='lightgreen', edgecolors='black') plt.title('Test graph') plt.xlabel('date') plt.ylabel('amount') plt.show() scatter method는 사용법이 plot method와 거의 동일합니다. (plot method 관련 = https://cosmosp..