일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 프로그래머스
- 영화 올드 줄거리
- 6시 기상
- 명상
- 수명예측 인공지능
- 기사스크랩
- Google Analytics
- 벚꽃개화시기
- 티스토리
- 구글애널리틱스
- 구글애널리틱스4
- 데이터문해력
- GA4
- 데이터 분석
- 독서
- ㅂㅂ
- 얼음여왕
- 감사인사
- 니다
- Python
- 알파줄거리
- 코오롱베네트
- 미라클 모닝
- 벚꽃
- 채용공고
- GA
- 코딩
- Today
- Total
목록2023/11/03 (13)
Data Analyst KIM
Cerebral Stroke Prediction-Imbalanced Dataset Identify Stroke on Imbalanced Dataset www.kaggle.com 1. 라이브러리 불러오기 import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.patches as mpatches from sklearn.impute import KNNImputer #Imputation %matplotlib inline import warnings warnings.filterwarnings("ignore") 2. 데이터 확인 df = pd.read_csv('dataset.csv') df.info() impor..
WITH tab AS ( SELECT car.daily_fee , car.car_type , his.history_id , DATEDIFF(END_DATE, START_DATE) + 1 AS period , CASE WHEN DATEDIFF(END_DATE, START_DATE) + 1 >= 90 THEN '90일 이상' WHEN DATEDIFF(END_DATE, START_DATE) + 1 >= 30 THEN '30일 이상' WHEN DATEDIFF(END_DATE, START_DATE) + 1 >= 7 THEN '7일 이상' ELSE 'NONE' END AS duration_type FROM CAR_RENTAL_COMPANY_RENTAL_HISTORY AS his INNER JOIN CAR_RENTA..
SELECT DATE_FORMAT(SALES_DATE,"%Y-%m-%d") SALES_DATE , PRODUCT_ID , USER_ID , SALES_AMOUNT FROM ONLINE_SALE WHERE SALES_DATE >= '2022-03-01' and SALES_DATE = '2022-03-01' and SALES_DATE < '2022-04-01' ORDER BY SALES_DATE , PRODUCT_ID , USER_ID
SELECT MEMBER_NAME , REVIEW_TEXT , DATE_FORMAT(r.REVIEW_DATE,'%Y-%m-%d') AS REVIEW_DATE FROM MEMBER_PROFILE m INNER JOIN REST_REVIEW r ON m.MEMBER_ID=r.MEMBER_ID WHERE m.MEMBER_ID = (SELECT MEMBER_ID FROM REST_REVIEW GROUP BY MEMBER_ID ORDER BY COUNT(MEMBER_ID) DESC LIMIT 1) ORDER BY REVIEW_DATE,REVIEW_TEXT
SELECT MONTH(START_DATE) AS MONTH , CAR_ID , COUNT(*) AS RECORDS FROM CAR_RENTAL_COMPANY_RENTAL_HISTORY WHERE DATE_FORMAT(START_DATE,'%Y-%m') BETWEEN '2022-08' AND '2022-10' AND CAR_ID IN (SELECT CAR_ID FROM CAR_RENTAL_COMPANY_RENTAL_HISTORY WHERE DATE_FORMAT(START_DATE,'%Y-%m') BETWEEN '2022-08' AND '2022-10' GROUP BY CAR_ID HAVING COUNT(CAR_ID) >= 5) GROUP BY MONTH(START_DATE), CAR_ID HAVING R..
SELECT a.AUTHOR_ID , a.AUTHOR_NAME , b.CATEGORY , SUM((SALES * PRICE)) AS TOTAL_SALES FROM BOOK b INNER JOIN AUTHOR a ON b.AUTHOR_ID = a.AUTHOR_ID INNER JOIN BOOK_SALES bs ON b.BOOK_ID = bs.BOOK_ID WHERE bs.SALES_DATE LIKE '2022-01%' GROUP BY b.CATEGORY, b.AUTHOR_ID ORDER BY AUTHOR_ID, CATEGORY DESC