일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Seaborn
- K 데이터 자격시험
- separating data(데이터 분리하기)
- 빅데이터 분석기사
- context manger1
- 준비
- 시험 일정
- pythonML
- List Comprehension
- 응시료
- numpy
- teen learn
- matplotlib
- 검정수수료
- Today
- Total
목록전체 글 (51)
재원's 블로그
최초 작성일 : 2021-11-08 categories:kaggle import numpy as np import pandas as pd import matplotlib.pyplot as plt # matplotlib와 그 안의 'plot(그래프)'를 import 한다는 뜻 import plotly.express as px #Express는 plotly라이브러리 에 내장된 일부 함수이고 이 함수를 import한다는 뜻. import plotly.graph_objects as go #plotly.graph_objects모듈을 import한다는 뜻. from warnings import filterwarnings #경고 메시지가 뜨지않게 예외처리 해준다는 뜻. filterwarnings(..
최초 작성일 : 2021-11-06 categories: google colab -구글 드라이브와 연동하기 from google.colab import drive drive.mount('/content/drive') Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True). -파일 불러오기 #DATA_PATH = "경로를 입력하시기를 바랍니다." # 필자의 경로는 다음과 같았습니다. DATA_PATH = '/content/drive/MyDrive/Colab Notebooks/lectures_210923/PART_I..
최초 작성일 : 2021-11-17 categories:kaggle 오늘은 ‘kaggle-surve-2021’ 질문지에서 질문 항목을 출력하는 작업을 했다. 아래 코드는 가장 기본적인 코드이다. df['Q11'].value_counts() #원하는 질문값을 '[]' 안에 'Q~~'이런식으로 Q와 번호를 써주면 질문안의 데이터가 출력된다. df_note = pd.DataFrame() #질문 항목 중 'Part'가 붙은 질문은 이런식으로 '반복문'을 작성해서 데이터 목록을 출력한다. df_note['std_notebook'] = [df_std[col][1:].value_counts().index[0] for col in d..
최초 작성일 : 2021-11-04 categories:Python Machine Learning 결정 나무는 머신러닝에서 중요한 개념 중 하나이다. 핵심 컨셉은 아래와 같다. 위 사진을 보면 단계 별로 나눠져 있는데 첫 번째 단계는 우리가 문제가 무엇인지 머신에게 알려주는 ‘Define Problem’과 data를 모아서 주든 어떤 형태로든 머신에게 주는 ‘Collect training data’가 있고 두 번째 단계는 데이터를 만드는 ‘Extract Data’와 결정 나무를 만드는 ‘Build a tree’가 있다. 세 번째는 머신이 작동하는 ‘Deploy machine’이 있다. 마지막 단계는 학습을 통해서 똑똑해진 머신이 우리가 데이터를 제시하면 그걸 구분하는 단계이다. 그리고 장점도 존재한다. ..
최초 작성일 : 2021-11-12 categories:Pandas 오늘은 'pandas'를 이용해서 '막대그래프'를 그려보았다. import pandas as pd #DataFrame 객체의 plot()메서드를 사용해서 막대그래프를 출력했다. data=[["Rudra",23,156,70], #DataFrame 객체에 값을 넣어준다. ["Nayan",20,136,60], ["Alok",15,100,35], ["Prince",30,150,85] ] df=pd.DataFrame(data,columns=["Name","Age","Height(cm)","Weight(kg)"]) print(df) import pandas as pd #DataFrame 객체의 plot()메서드를 사용해..
최초 작성일 : 2021-11-11 categories:Matplotlib 오늘은 '막대그래프'를 그리는걸 연습했다. import matplotlib.pyplot as plt #또는 from matplotlib import pyplot as plt 로 쓸 수도 있다. years = [1950, 1960, 1970, 1980, 1990, 2000, 2010] gdp = [67.0, 80.0, 257.0, 1686.0, 6505, 11865.3, 22105.3] #1인당 국민소득 plt.bar(range(len(years)), gdp) #막대그래프 호출: bar(x, y) plt.title("GDP per capita") #차트 제목 plt.ylabel('dollars') #y축..
최초 작성일 : 2021-11-22 categories:Matplotlib 히트맵 (Heatmap)은 다양한 값을 갖는 숫자 데이터를 열분포 형태와 같이 색상을 이용해서 시각화한 것이다. matplotlib.pyplot 모듈의 matshow() 함수를 이용해서 2차원 어레이 형태의 숫자 데이터를 히트맵을 그려보자. import matplotlib.pyplot as plt import numpy as np arr = np.random.standard_normal((30, 40)) #np.random.standard_normal() 로 만들어진 2차원 어레이 arr는 #표준정규분포를 갖는 (30, 40) 형태의 2차원 어레이 plt.matshow(arr) #matshow() 함수에 어레이의 형태로 #값들을 ..
최초 작성일 : 2021-11-24 categories:Matplotlib 히스토그램 (Histogram)은 도수분포표를 그래프로 나타낸 것으로서, 가로축은 계급, 세로축은 도수 (횟수나 개수 등)를 나타냅니다. 이번에는 matplotlib.pyplot 모듈의 hist() 함수를 이용해서 다양한 히스토그램을 그려 보겠습니다. Keyword: plt.hist(), histogram, 히스토그램 import matplotlib.pyplot as plt weight = [68, 81, 64, 56, 78, 74, 61, 77, 66, 68, 59, 71, 80, 59, 67, 81, 69, 73, 69, 74, 70, 65] plt.hist(weight) plt.show() weight는 몸무게 값을 나타내는..