Last active
April 21, 2021 01:05
-
-
Save dongdongju96/05dffd505525b91d21811475e4c4f7f4 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"id": "60723dfd", | |
"metadata": { | |
"hide_input": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# 6하원칙\n", | |
"# 누가 군인들\n", | |
"# 언제 정의에서 기간 정의\n", | |
"# 어디서 PX에서\n", | |
"# 무엇을 \n", | |
"# 어떻게 \n", | |
"# 왜 \n", | |
"# 주제 : 데이터 기간동안 px의 인기상품 변화를 큰틀에서 보여주고 여름에 음료가 많이 팔리는데 음료 변화의 구체적 동향 소개" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"id": "3918c738", | |
"metadata": { | |
"hide_input": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# 라이브러리 import\n", | |
"import pandas as pd\n", | |
"import datetime\n", | |
"### 기타\n", | |
"from IPython.display import display_html\n", | |
"from IPython.display import HTML, display\n", | |
"from IPython.display import Image\n", | |
"import ipywidgets as widgets\n", | |
"import warnings\n", | |
"## 그래프\n", | |
"import matplotlib as mpl\n", | |
"import matplotlib.pyplot as plt\n", | |
"import plotly.express as px\n", | |
"import bar_chart_race as bcr\n", | |
"import matplotlib.font_manager as fm\n", | |
"import plotly.graph_objs as go" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"id": "f32aaf6c", | |
"metadata": { | |
"hide_input": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# 데이터 불러오기\n", | |
"df = pd.read_csv('국방부 PX 인기상품 정보_20210228.csv',encoding='cp949')\n", | |
"# 데이터 기본 전처리\n", | |
"df = df.drop(columns='행번호')\n", | |
"df['상품명'] = df['상품명'].str.replace(\"(\",\"\", regex=True).str.replace(\")\",\"\", regex=True).str.replace(\"_\",\"\").str.replace(\" \",\"\").str.replace(\"㎖\",\"ml\").str.replace(\"ML\",\"ml\")\n", | |
"# 경고 제거\n", | |
"warnings.filterwarnings('ignore')" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"id": "1afb64d2", | |
"metadata": {}, | |
"source": [ | |
"# PX 인기상품의 변화 살펴보기!" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"id": "7f6d5d34", | |
"metadata": { | |
"hide_input": true | |
}, | |
"outputs": [ | |
{ | |
"data": { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment