본문 바로가기

Python53

Python 데이터분석 -쇼핑몰 고객주문 데이터 프로젝트 1. 고객 주문 데이터 파악하기 1-1. 데이터 셋 가상 온라인 리테일 사이트의 2010/12 ~ 2011/12까지의 주문 기록 데이터 약 500,000건의 데이터 ✔ import, 드라이브 연결 1-2. 컬럼 살펴보기 InvoiceNo: 주문번호 StockCode: 아이템 아이디 Description: 상품 설명 Quantity: 주문 수량 InvoiceDate: 주문 시간 UnitPrice: 상품 가격 CustomerID: 고객 아이디 Country: 고객 거주 지역(국가) 1-3. 날짜 타입 데이터 변환 문자열로 데이터를 로딩하는 것보다 datetime 타입으로 로딩하는 것이 날짜 분석 및 계산에 용이 1-4. 매출 구하기 2. 매출 데이터로부터 Insight 전체 매출의 약 82%가 UK에서 발생.. 2023. 2. 19.
Python 데이터분석 matplotlib 1. matplotlib 파이썬 기반 시각화 라이브러리 파이썬 표준 시각화 도구라고 불릴만큼 다양한 기능을 제공 한글에 대한 지원이 완벽하지 않음 세부기능이 많아 사용성이 복잡함 pandas와 연동이 용이함 matplotlib 공식 홈페이지 https://matplotlib.org Matplotlib — Visualization with Python seaborn seaborn is a high level interface for drawing statistical graphics with Matplotlib. It aims to make visualization a central part of exploring and understanding complex datasets. statistical dat.. 2023. 2. 19.
Python 데이터 분석 Data Preprecessing 1. 데이터 전처리(Data Preprecessing) 특정 분석에 적합하게 데이터를 가공하는 작업 업무에서 사용하는 데이터는 분석, 머신러닝(딥러닝)에 적합하지 않은 경우가 많기 때문에 이를 방지하기 위한 작업을 함 2. 공공데이터 * [공공데이터](https://bit.ly/ds-house-price) * [민간 아파튼 가격동향](https://bit.ly/ds-house-price) ✔ strip() : 공백이 있는 데이터의 해당 앞뒤 공백을 삭제하는 기능을 가지고 있다. 2023. 2. 18.
Python Pandas 2 2. 데이터 기본 정보 알아보기 df = pd.read_csv('http://bit.ly/ds-korean-idol') df type(df) pandas.core.frame.DataFrame 2-1. column(열) df.columns Index(['이름', '그룹', '소속사', '성별', '생년월일', '키', '혈액형', '브랜드평판지수'], dtype='object') new_column = ['name','group','company','gender','birthday','height','blood','brand'] df.columns = new_column df.columns Index(['name', 'group', 'company', 'gender', 'birthday', 'height'.. 2023. 2. 17.