728x90
출고량 예측 분석하기
- 데이터 불러오기 및 합치기
import pandas as pd
import numpy as np
import seaborn as sns
destination = pd.read_csv('destination.csv')
product = pd.read_csv('product.csv')
center = pd.read_csv('center.csv')
delivery = pd.read_csv('delivery.csv', parse_dates = ['ship_time']) # ship_time이 object 형식으로 나오기 때문에
필요한 것만 정리하기
delivery_1 = delivery[['ship_time', 'center_code', 'region', 'qt', 'box_qt', 'unit_qt', 'product_code', 'destination_code']]
product_1 = product[['ship_unit', 'ship_unit_qt', 'std_weight', 'condition', 'remark1', 'remark2', 'cbm', 'product_code', 'customer_code']]
center_1 = center[['center_code', 'func']]
destination_1 = destination[['destination_code', 'address']]
destination_1 = destination_1.drop_duplicates()customer_code
합치기
RT = pd.merge(delivery_1, product_1, how = 'left', on = 'product_code')
RT_ver1 = pd.merge(RT, center_1, how = 'left', on = 'center_code')
RT_ver2 = pd.merge(RT_ver1, destination_1, how = 'left', on = 'destination_code')'성동1기 전Z전능 데이터 분석가 과정' 카테고리의 다른 글
| [성동1기 전Z전능 데이터 분석가] 53일차 파이널 프로젝트 (0) | 2024.01.04 |
|---|---|
| [성동1기 전Z전능 데이터 분석가] 50일차 파이널 프로젝트 (1) | 2024.01.02 |
| [성동1기 전Z전능 데이터 분석가] 48일차 - EDA 요일별 (0) | 2023.12.27 |
| [성동1기 전Z전능 데이터 분석가] 46일차 전처리 (0) | 2023.12.27 |
| [성동1기 전Z전능 데이터 분석가] 44일차 코멘토 대표님의 특강 (0) | 2023.12.14 |