일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 시계열 데이터
- LogisticRegression
- scikitlearn
- dataframe
- 로지스틱회귀분석
- 분류
- 단순선형회귀분석
- 지도학습
- 비지도학습
- 데이터전처리
- time series
- RegressionTree
- DataScience
- 데이터분석
- deeplearning
- 잔차분석
- machinelearning
- GridSearchCV
- 다중선형회귀분석
- 선형회귀분석
- OrdinalEncoder
- 하이퍼파라미터
- 딥러닝
- LinearRegression
- ML
- 결정계수
- Python
- 손실함수
- 시계열데이터
- 의사결정나무
- Today
- Total
목록dataframe (6)
IE가 어른이 되기까지

우리는 Matplotlib이라는 라이브러리를 통해 그래프를 출력할 수 있습니다. %matplotlib inline import matplotlib.pyplot as plt temperatures = [4.4, 5.1, 6.1, 6.2, 6.1, 6.1, 5.7, 5.2, 4.7, 4.1, 3.9, 3.5] graph = pd.Series(temperatures, name="Temperature") graph.plot() plt.show() Series 데이터로 출력한 그래프입니다. .plot( )라는 함수로 그래프로 만들고 .show( )를 실행하면 그래프가 출력됩니다. people.plot(kind = "line", x = "body_mass_index", y = ["height", "weight"])..

데이터 분석을 하다 보면 DataFrame 형태의 데이터를 다루게 되는 경우가 많습니다. 이번에는 DataFrame 활용 시 자주 사용하는 방법에 대해 알아보도록 하겠습니다. import pandas as pd import numpy as np much_data = np.fromfunction(lambda x, y: (x + y * y) % 17 * 11, (10000, 26)) large_df = pd.DataFrame(much_data, columns=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")) large_df[large_df % 16 == 0] = np.nan large_df.insert(3,"some_text", "Blabla") large_df 이를 위해 먼저 'large_d..

우리는 Groupby를 통해 데이터를 그룹핑하고 각 그룹에 대해 연산을 수행할 수 있습니다. 앞서 배운 연산들을 통해 Groupby라는 함수를 사용해보도록 하겠습니다. DataFrame Groupby import numpy as np import pandas as pd grades2_array = np.array([[np.nan,8,9, np.nan],[10,9,np.nan, np.nan],[4, 8, 2, np.nan], [np.nan, 10, 10, np.nan]]) grades2 = pd.DataFrame(grades2_array, columns=["sep", "oct", "nov", "dec"], index=["alice","bob","charles","darwin"]) grades2["hobby..