카페검색 본문
카페글 본문
-
Re: 문제272. (오늘의 마지막 문제) 개인적으로 수집한 네이버 쇼핑 데이터를 가지고... 2023.02.16해당카페글 미리보기
위해 함수 생성 및 적용 def extract_number(text): str_list = [] for i in text: if i.isdigit()==True: str_list.append(i) a = ''.join(str_list) b = int(a) return b def split_price(num): num2 = str(num) if len(num2) < 7 : return int(num...
-
Re: 문제220. (오늘의 마지막 문제) 월 1000 자동화 코드에 9번에 추가한.... 2023.02.08해당카페글 미리보기
a.columns = ['telecom', 'cnt' ] plt.pie( list( a.cnt ), labels = list(a.telecom), autopct='%0.00f%%' ) """ hist_chart = """ import seaborn as sns import matplotlib.pyplot as plt sns.set_style("darkgrid") # 격자모양을 출력 cars = pd.read...
-
빈출 사용 단어를 통해 언론의 키워드 노출 지속성 파악하기 2022.08.19해당카페글 미리보기
생성하는 함수 만들기(검색어, 크롤링 시작 페이지, 크롤링 종료 페이지) def makeUrl(search, start_pg, end_pg): if start_pg == end_pg: start_page = makePgNum(start_pg) url = "https://search.naver.com/search.naver?where=news&query=" + search...
-
분류모델 별 당뇨병 분류 정확도 비교 및 시각화 2022.08.19해당카페글 미리보기
diabetes.columns) diabetes.describe() (6) 데이터 분리 x = diabetes[['glucose', 'bloodpressure']] y = diabetes['diabetes'] x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.1, random_state=1) 5. Knn (1) 모델 생성 및...
-
2018~2021년 코로나 전후 소비자 피해 변화 분석 시각화 2022.08.19해당카페글 미리보기
3.columns = ['물품소분류','코로나 이전','코로나 이후'] result3['증감']= result3['코로나 이후']-result3['코로나 이전'] result3['증감절대치']= abs(result3.증감) result3['증감율']= round(result3.증감/result3['코로나 이전']*100,1) # 상위...
-
직장에서 직급, 근무 시간, 정신적 피로도와 번아웃의 관계 2022.08.18해당카페글 미리보기
상자 그림 출력 def outlier_value(x): # 이상치를 확인하는 함수 f, axes = plt.subplots(1,4,figsize=(16,4)) #다수의 그래프...숫자형 컬럼데이터의 초기 인덱스 값 설정 for i in x.columns[x.dtypes=='float64']: # 숫자형 컬럼 반복문 실행 ax...
-
소비자 상담민원 접수내역을 바탕으로 분류별 이슈 분석 시각화 2022.08.16해당카페글 미리보기
5 함수 생성 def graph(name): name = input('연령대를 입력하시오') #테이블 생성 age1 = consult[:][consult['년도']=='2020년'] age2= age1.groupby(['품목','연령대'])['년도'].count().astype('int').reset_index() age2['순위'] = age2.groupby...
-
생활인구수와 부동산 실 거래 정보에대한 데이터 분석 시각화 2022.08.15해당카페글 미리보기
prop.columns.values)) ax = live_mg_prop.plot(kind='barh', stacked=True, rot=0, figsize=(10,6), color = colors) for p in ax.patches: left, bottom, width, height = p.get_bbox().bounds ax.annotate("%.1f"%(width*100), xy=(left+width/2...
-
Re: 문제225. 위의 reg 함수에서 절편이 출력되지 않고 있습니다. 절편이 나올수 있도록... 2022.08.11해당카페글 미리보기
csv("d:\\data\\multi_hg.csv", encoding='euc-kr') def reg(y, x): x['intercept'] = 1 # 절편을 추가해줍니다 x_c = x.columns # 컬럼들 이름을 가져옵니다 x = x.to_numpy() b = np.dot( np.linalg.inv(np.dot(x.T, x)), np.dot(x.T, y)) for i in...
-
Re: 문제225. 위의 reg 함수에서 절편이 출력되지 않고 있습니다. 절편이 나올수 있도록... 2022.08.11해당카페글 미리보기
as np smart = pd.read_csv("c:\\data\\multi_hg.csv", encoding="euckr") def reg(y, x): x['Intercept'] = 1 x_c = x.columns x = x.to_numpy() b = np.dot( np.dot( np.linalg.inv(np.dot(x.T, x) ), x.T), y) print(b) for i in range( len(x_c...