1. 데이터로 탐험을 떠나요!¶
- 여러분이 선호하는 데이터셋을 선정하고
- 이 데이터셋에 대한 여러 가설을 세워주세요
- 가설을 증명하기 위한 여러 데이터 분석 및 시각화를 진행해주세요
1. 데이터셋 선정¶
Kaggle에서 'Video Game Sale'라는 데이터셋을 활용한다. https://www.kaggle.com/gregorut/videogamesales
데이터셋의 속성과 설명은 아래를 참고한다.
- Rank : 게임의 전체 판매량 순위
- Name : 게임의 이름
- Platform : 게임이 출시한 플랫폼 (PS4, PC 등)
- Year : 게임 출시연도
- Genre : 게임의 장르
- Publisher : 게임 퍼블리셔
- NA_Sales : 해당 게임의 북아메리카 판매량 (단위 : million)
- EU_Sales : 해당 게임의 유럽 판매량 (단위 : million)
- JP_Sales : 해당 게임의 일본 판매량 (단위 : million)
- Other_Sales : 해당 게임의 나머지 나라의 판매량 (단위 : million)
- Global_Sales : 전 세계에서의 전체 게임 판매량
In [1]:
# 1. 라이브러리 준비
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
In [4]:
# 2. 데이터 호출 및 확인
df_game = pd.read_csv('D:/workspaces/WinterStudy2022/datasetvdgame/vgsales.csv')
df_game.head()
Out[4]:
Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | Wii Sports | Wii | 2006.0 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
1 | 2 | Super Mario Bros. | NES | 1985.0 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
2 | 3 | Mario Kart Wii | Wii | 2008.0 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
3 | 4 | Wii Sports Resort | Wii | 2009.0 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996.0 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
In [5]:
df_game.tail()
Out[5]:
Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
---|---|---|---|---|---|---|---|---|---|---|---|
16593 | 16596 | Woody Woodpecker in Crazy Castle 5 | GBA | 2002.0 | Platform | Kemco | 0.01 | 0.00 | 0.0 | 0.0 | 0.01 |
16594 | 16597 | Men in Black II: Alien Escape | GC | 2003.0 | Shooter | Infogrames | 0.01 | 0.00 | 0.0 | 0.0 | 0.01 |
16595 | 16598 | SCORE International Baja 1000: The Official Game | PS2 | 2008.0 | Racing | Activision | 0.00 | 0.00 | 0.0 | 0.0 | 0.01 |
16596 | 16599 | Know How 2 | DS | 2010.0 | Puzzle | 7G//AMES | 0.00 | 0.01 | 0.0 | 0.0 | 0.01 |
16597 | 16600 | Spirits & Spells | GBA | 2003.0 | Platform | Wanadoo | 0.01 | 0.00 | 0.0 | 0.0 | 0.01 |
- 가설설정
- 가장 많은 일본판매량을 올린 퍼블리셔는 Nintendo일 것이다.
- 유럽에서 가장 잘 판매되는 장르는 Sport일 것이다.
- 게임이 가장 많이 판매됬던 시기는 2010년대(2010 ~ 2019년)일 것이다.(global sales 기준)
2. 가설검증¶
1. 가장 많은 일본판매량을 올린 퍼블리셔는 Nintendo일 것이다.¶
- 사용할 Column : Publisher, JP_Sales
In [10]:
# Publisher의 범주 찾기
df_game['Publisher'].unique()
Out[10]:
array(['Nintendo', 'Microsoft Game Studios', 'Take-Two Interactive', 'Sony Computer Entertainment', 'Activision', 'Ubisoft', 'Bethesda Softworks', 'Electronic Arts', 'Sega', 'SquareSoft', 'Atari', '505 Games', 'Capcom', 'GT Interactive', 'Konami Digital Entertainment', 'Sony Computer Entertainment Europe', 'Square Enix', 'LucasArts', 'Virgin Interactive', 'Warner Bros. Interactive Entertainment', 'Universal Interactive', 'Eidos Interactive', 'RedOctane', 'Vivendi Games', 'Enix Corporation', 'Namco Bandai Games', 'Palcom', 'Hasbro Interactive', 'THQ', 'Fox Interactive', 'Acclaim Entertainment', 'MTV Games', 'Disney Interactive Studios', nan, 'Majesco Entertainment', 'Codemasters', 'Red Orb', 'Level 5', 'Arena Entertainment', 'Midway Games', 'JVC', 'Deep Silver', '989 Studios', 'NCSoft', 'UEP Systems', 'Parker Bros.', 'Maxis', 'Imagic', 'Tecmo Koei', 'Valve Software', 'ASCII Entertainment', 'Mindscape', 'Infogrames', 'Unknown', 'Square', 'Valve', 'Activision Value', 'Banpresto', 'D3Publisher', 'Oxygen Interactive', 'Red Storm Entertainment', 'Video System', 'Hello Games', 'Global Star', 'Gotham Games', 'Westwood Studios', 'GungHo', 'Crave Entertainment', 'Hudson Soft', 'Coleco', 'Rising Star Games', 'Atlus', 'TDK Mediactive', 'ASC Games', 'Zoo Games', 'Accolade', 'Sony Online Entertainment', '3DO', 'RTL', 'Natsume', 'Focus Home Interactive', 'Alchemist', 'Black Label Games', 'SouthPeak Games', 'Mastertronic', 'Ocean', 'Zoo Digital Publishing', 'Psygnosis', 'City Interactive', 'Empire Interactive', 'Success', 'Compile', 'Russel', 'Taito', 'Agetec', 'GSP', 'Microprose', 'Play It', 'Slightly Mad Studios', 'Tomy Corporation', 'Sammy Corporation', 'Koch Media', 'Game Factory', 'Titus', 'Marvelous Entertainment', 'Genki', 'Mojang', 'Pinnacle', 'CTO SpA', 'TalonSoft', 'Crystal Dynamics', 'SCi', 'Quelle', 'mixi, Inc', 'Rage Software', 'Ubisoft Annecy', 'Scholastic Inc.', 'Interplay', 'Mystique', 'ChunSoft', 'Square EA', '20th Century Fox Video Games', 'Avanquest Software', 'Hudson Entertainment', 'Nordic Games', 'Men-A-Vision', 'Nobilis', 'Big Ben Interactive', 'Touchstone', 'Spike', 'Jester Interactive', 'Nippon Ichi Software', 'LEGO Media', 'Quest', 'Illusion Softworks', 'Tigervision', 'Funbox Media', 'Rocket Company', 'Metro 3D', 'Mattel Interactive', 'IE Institute', 'Rondomedia', 'Sony Computer Entertainment America', 'Universal Gamex', 'Ghostlight', 'Wizard Video Games', 'BMG Interactive Entertainment', 'PQube', 'Trion Worlds', 'Laguna', 'Ignition Entertainment', 'Takara', 'Kadokawa Shoten', 'Destineer', 'Enterbrain', 'Xseed Games', 'Imagineer', 'System 3 Arcade Software', 'CPG Products', 'Aruze Corp', 'Gamebridge', 'Midas Interactive Entertainment', 'Jaleco', 'Answer Software', 'XS Games', 'Activision Blizzard', 'Pack In Soft', 'Rebellion', 'Xplosiv', 'Ultravision', 'GameMill Entertainment', 'Wanadoo', 'NovaLogic', 'Telltale Games', 'Epoch', 'BAM! Entertainment', 'Knowledge Adventure', 'Mastiff', 'Tetris Online', 'Harmonix Music Systems', 'ESP', 'TYO', 'Telegames', 'Mud Duck Productions', 'Screenlife', 'Pioneer LDC', 'Magical Company', 'Mentor Interactive', 'Kemco', 'Human Entertainment', 'Avanquest', 'Data Age', 'Electronic Arts Victor', 'Black Bean Games', 'Jack of All Games', '989 Sports', 'Takara Tomy', 'Media Rings', 'Elf', 'Kalypso Media', 'Starfish', 'Zushi Games', 'Jorudan', 'Destination Software, Inc', 'New', 'Brash Entertainment', 'ITT Family Games', 'PopCap Games', 'Home Entertainment Suppliers', 'Ackkstudios', 'Starpath Corp.', 'P2 Games', 'BPS', 'Gathering of Developers', 'NewKidCo', 'Storm City Games', 'CokeM Interactive', 'CBS Electronics', 'Magix', 'Marvelous Interactive', 'Nihon Falcom Corporation', 'Wargaming.net', 'Angel Studios', 'Arc System Works', 'Playmates', 'SNK Playmore', 'Hamster Corporation', 'From Software', 'Nippon Columbia', 'Nichibutsu', 'Little Orbit', 'Conspiracy Entertainment', 'DTP Entertainment', 'Hect', 'Mumbo Jumbo', 'Pacific Century Cyber Works', 'Indie Games', 'Liquid Games', 'NEC', 'Axela', 'ArtDink', 'Sunsoft', 'Gust', 'SNK', 'NEC Interchannel', 'FuRyu', 'Xing Entertainment', 'ValuSoft', 'Victor Interactive', 'Detn8 Games', 'American Softworks', 'Nordcurrent', 'Bomb', 'Falcom Corporation', 'AQ Interactive', 'CCP', 'Milestone S.r.l.', 'Sears', 'JoWood Productions', 'Seta Corporation', 'On Demand', 'NCS', 'Aspyr', 'Gremlin Interactive Ltd', 'Agatsuma Entertainment', 'Compile Heart', 'Culture Brain', 'Mad Catz', 'Shogakukan', 'Merscom LLC', 'Rebellion Developments', 'Nippon Telenet', 'TDK Core', 'bitComposer Games', 'Foreign Media Games', 'Astragon', 'SSI', 'Kadokawa Games', 'Idea Factory', 'Performance Designed Products', 'Asylum Entertainment', 'Core Design Ltd.', 'PlayV', 'UFO Interactive', 'Idea Factory International', 'Playlogic Game Factory', 'Essential Games', 'Adeline Software', 'Funcom', 'Panther Software', 'Blast! Entertainment Ltd', 'Game Life', 'DSI Games', 'Avalon Interactive', 'Popcorn Arcade', 'Neko Entertainment', 'Vir2L Studios', 'Aques', 'Syscom', 'White Park Bay Software', 'System 3', 'Vatical Entertainment', 'Daedalic', 'EA Games', 'Media Factory', 'Vic Tokai', 'The Adventure Company', 'Game Arts', 'Broccoli', 'Acquire', 'General Entertainment', 'Excalibur Publishing', 'Imadio', 'Swing! Entertainment', 'Sony Music Entertainment', 'Aqua Plus', 'Paradox Interactive', 'Hip Interactive', 'DreamCatcher Interactive', 'Tripwire Interactive', 'Sting', 'Yacht Club Games', 'SCS Software', 'Bigben Interactive', 'Havas Interactive', 'Slitherine Software', 'Graffiti', 'Funsta', 'Telstar', 'U.S. Gold', 'DreamWorks Interactive', 'Data Design Interactive', 'MTO', 'DHM Interactive', 'FunSoft', 'SPS', 'Bohemia Interactive', 'Reef Entertainment', 'Tru Blu Entertainment', 'Moss', 'T&E Soft', 'O-Games', 'Aksys Games', 'NDA Productions', 'Data East', 'Time Warner Interactive', 'Gainax Network Systems', 'Daito', 'O3 Entertainment', 'Gameloft', 'Xicat Interactive', 'Simon & Schuster Interactive', 'Valcon Games', 'PopTop Software', 'TOHO', 'HMH Interactive', '5pb', 'Cave', 'CDV Software Entertainment', 'Microids', 'PM Studios', 'Paon', 'Micro Cabin', 'GameTek', 'Benesse', 'Type-Moon', 'Enjoy Gaming ltd.', 'Asmik Corp', 'Interplay Productions', 'Asmik Ace Entertainment', 'inXile Entertainment', 'Image Epoch', 'Phantom EFX', 'Evolved Games', 'responDESIGN', 'Culture Publishers', 'Griffin International', 'Hackberry', 'Hearty Robin', 'Nippon Amuse', 'Origin Systems', 'Seventh Chord', 'Mitsui', 'Milestone', 'Abylight', 'Flight-Plan', 'Glams', 'Locus', 'Warp', 'Daedalic Entertainment', 'Alternative Software', 'Myelin Media', 'Mercury Games', 'Irem Software Engineering', 'Sunrise Interactive', 'Elite', 'Evolution Games', 'Tivola', 'Global A Entertainment', 'Edia', 'Athena', 'Aria', 'Gamecock', 'Tommo', 'Altron', 'Happinet', 'iWin', 'Media Works', 'Fortyfive', 'Revolution Software', 'Imax', 'Crimson Cow', '10TACLE Studios', 'Groove Games', 'Pack-In-Video', 'Insomniac Games', 'Ascaron Entertainment GmbH', 'Asgard', 'Ecole', 'Yumedia', 'Phenomedia', 'HAL Laboratory', 'Grand Prix Games', 'DigiCube', 'Creative Core', 'Kaga Create', 'WayForward Technologies', 'LSP Games', 'ASCII Media Works', 'Coconuts Japan', 'Arika', 'Ertain', 'Marvel Entertainment', 'Prototype', 'TopWare Interactive', 'Phantagram', '1C Company', 'The Learning Company', 'TechnoSoft', 'Vap', 'Misawa', 'Tradewest', 'Team17 Software', 'Yeti', 'Pow', 'Navarre Corp', 'MediaQuest', 'Max Five', 'Comfort', 'Monte Christo Multimedia', 'Pony Canyon', 'Riverhillsoft', 'Summitsoft', 'Milestone S.r.l', 'Playmore', 'MLB.com', 'Kool Kizz', 'Flashpoint Games', '49Games', 'Legacy Interactive', 'Alawar Entertainment', 'CyberFront', 'Cloud Imperium Games Corporation', 'Societa', 'Virtual Play Games', 'Interchannel', 'Sonnet', 'Experience Inc.', 'Zenrin', 'Iceberg Interactive', 'Ivolgamus', '2D Boy', 'MC2 Entertainment', 'Kando Games', 'Just Flight', 'Office Create', 'Mamba Games', 'Fields', 'Princess Soft', 'Maximum Family Games', 'Berkeley', 'Fuji', 'Dusenberry Martin Racing', 'imageepoch Inc.', 'Big Fish Games', 'Her Interactive', 'Kamui', 'ASK', 'Headup Games', 'KSS', 'Cygames', 'KID', 'Quinrose', 'Sunflowers', 'dramatic create', 'TGL', 'Encore', 'Extreme Entertainment Group', 'Intergrow', 'G.Rev', 'Sweets', 'Kokopeli Digital Studios', 'Number None', 'Nexon', 'id Software', 'BushiRoad', 'Tryfirst', 'Strategy First', '7G//AMES', 'GN Software', "Yuke's", 'Easy Interactive', 'Licensed 4U', 'FuRyu Corporation', 'Lexicon Entertainment', 'Paon Corporation', 'Kids Station', 'GOA', 'Graphsim Entertainment', 'King Records', 'Introversion Software', 'Minato Station', 'Devolver Digital', 'Blue Byte', 'Gaga', 'Yamasa Entertainment', 'Plenty', 'Views', 'fonfun', 'NetRevo', 'Codemasters Online', 'Quintet', 'Phoenix Games', 'Dorart', 'Marvelous Games', 'Focus Multimedia', 'Imageworks', 'Karin Entertainment', 'Aerosoft', 'Technos Japan Corporation', 'Gakken', 'Mirai Shounen', 'Datam Polystar', 'Saurus', 'HuneX', 'Revolution (Japan)', 'Giza10', 'Visco', 'Alvion', 'Mycom', 'Giga', 'Warashi', 'System Soft', 'Sold Out', 'Lighthouse Interactive', 'Masque Publishing', 'RED Entertainment', 'Michaelsoft', 'Media Entertainment', 'New World Computing', 'Genterprise', 'Interworks Unlimited, Inc.', 'Boost On', 'Stainless Games', 'EON Digital Entertainment', 'Epic Games', 'Naxat Soft', 'Ascaron Entertainment', 'Piacci', 'Nitroplus', 'Paradox Development', 'Otomate', 'Ongakukan', 'Commseed', 'Inti Creates', 'Takuyo', 'Interchannel-Holon', 'Rain Games', 'UIG Entertainment'], dtype=object)
In [14]:
df_game_publisher = df_game[['Publisher', 'JP_Sales']].groupby(['Publisher']).sum()
df_game_publisher
Out[14]:
JP_Sales | |
---|---|
Publisher | |
10TACLE Studios | 0.00 |
1C Company | 0.00 |
20th Century Fox Video Games | 0.00 |
2D Boy | 0.00 |
3DO | 0.00 |
... | ... |
id Software | 0.00 |
imageepoch Inc. | 0.04 |
inXile Entertainment | 0.00 |
mixi, Inc | 0.86 |
responDESIGN | 0.00 |
578 rows × 1 columns
In [18]:
# 0을 제외한 값만 산출
df_pub = df_game_publisher[df_game_publisher['JP_Sales'] != 0]
df_pub
Out[18]:
JP_Sales | |
---|---|
Publisher | |
505 Games | 2.05 |
5pb | 1.61 |
989 Studios | 0.10 |
AQ Interactive | 0.11 |
ASCII Entertainment | 9.40 |
... | ... |
Zushi Games | 0.01 |
dramatic create | 0.11 |
fonfun | 0.02 |
imageepoch Inc. | 0.04 |
mixi, Inc | 0.86 |
304 rows × 1 columns
In [29]:
# 오름차순 정렬 실시
df_pub = df_pub.sort_values(by=['JP_Sales'], ascending = False)
df_pub
Out[29]:
JP_Sales | |
---|---|
Publisher | |
Nintendo | 455.42 |
Namco Bandai Games | 127.07 |
Konami Digital Entertainment | 91.30 |
Sony Computer Entertainment | 74.10 |
Capcom | 68.08 |
... | ... |
Piacci | 0.01 |
Commseed | 0.01 |
Genterprise | 0.01 |
Yacht Club Games | 0.01 |
Interplay | 0.01 |
304 rows × 1 columns
In [31]:
# 304개의 행이 존재하므로, 상위 5개 행을 제외한 나머지를 모두 삭제한다.
df_pub = df_pub[df_pub['JP_Sales'] >= 68]
df_pub
Out[31]:
JP_Sales | |
---|---|
Publisher | |
Nintendo | 455.42 |
Namco Bandai Games | 127.07 |
Konami Digital Entertainment | 91.30 |
Sony Computer Entertainment | 74.10 |
Capcom | 68.08 |
In [47]:
df_game_publisher = df_game_publisher.sort_values(by = ['JP_Sales'], ascending = False)
df_game_publisher
Out[47]:
JP_Sales | |
---|---|
Publisher | |
Nintendo | 455.42 |
Namco Bandai Games | 127.07 |
Konami Digital Entertainment | 91.30 |
Sony Computer Entertainment | 74.10 |
Capcom | 68.08 |
... | ... |
DreamWorks Interactive | 0.00 |
DreamCatcher Interactive | 0.00 |
Devolver Digital | 0.00 |
Detn8 Games | 0.00 |
responDESIGN | 0.00 |
578 rows × 1 columns
In [79]:
# df을 series형태로 변환
# df의 이름을 추출하면 df가 모두 series 형태로 나옴
series_pub = df_pub['JP_Sales']
series_pub
Out[79]:
Publisher Nintendo 455.42 Namco Bandai Games 127.07 Konami Digital Entertainment 91.30 Sony Computer Entertainment 74.10 Capcom 68.08 Name: JP_Sales, dtype: float64
In [124]:
# Series의 key값을 모두 출력
series_pub.keys()
Out[124]:
Index(['Nintendo', 'Namco Bandai Games', 'Konami Digital Entertainment', 'Sony Computer Entertainment', 'Capcom'], dtype='object', name='Publisher')
In [125]:
plt.figure(figsize = (15, 7))
sales_plot1 = sns.barplot(x = series_pub.keys(), y = df_pub['JP_Sales'], data = df_pub)
sales_plot1.set_title("Publisher vs JP_Sales", size = 20)
plt.show()
- 분석 결과, 가장 많은 판매량을 올린 publisher는 Nintendo라는 사실을 알 수 있다.
- 따라서, "가설1.가장 많은 일본판매량을 올린 퍼블리셔는 Nintendo일 것이다"는 성립한다.
2. 유럽에서 가장 잘 판매되는 장르는 Sport일 것이다.¶
- 사용할 Column : EU_Sales, Genre
In [128]:
df_game['Genre'].unique()
Out[128]:
array(['Sports', 'Platform', 'Racing', 'Role-Playing', 'Puzzle', 'Misc', 'Shooter', 'Simulation', 'Action', 'Fighting', 'Adventure', 'Strategy'], dtype=object)
In [132]:
df_Genre = df_game[['Genre', 'EU_Sales']].groupby(['Genre']).sum()
df_Genre
Out[132]:
EU_Sales | |
---|---|
Genre | |
Action | 525.00 |
Adventure | 64.13 |
Fighting | 101.32 |
Misc | 215.98 |
Platform | 201.63 |
Puzzle | 50.78 |
Racing | 238.39 |
Role-Playing | 188.06 |
Shooter | 313.27 |
Simulation | 113.38 |
Sports | 376.85 |
Strategy | 45.34 |
In [145]:
df_Genre = df_Genre.sort_values(by = ['EU_Sales'], ascending = False)
In [156]:
# 글씨 전체 크기 조정
sns.set(font_scale = 1.5)
# 그래프 크기 조정
plt.figure(figsize = (20, 7))
# 그래프 그리기
plot2 = sns.barplot(x = df_Genre['EU_Sales'].keys(), y = df_Genre['EU_Sales'])
# 제목 크기 및 내용 설정
plot2.set_title("Genre in EU_Sales", fontsize = 30)
plt.show()
- 분석 결과, 유럽에서 가장 많은 판매량을 올린 장르는 Action이다.
- 따라서, "가설2.유럽에서 가장 잘 판매되는 장르는 Sport일 것이다"는 내용은 거짓이다.
3. 해당 데이터에 올라간 게임을 기준으로, 게임이 가장 많이 판매됬던 시기는 2010년대(2010 ~ 2019)일 것이다.(global sales 기준)¶
- 사용할 Column : Year, Global_Sales
In [157]:
# 결측치 확인
df_game.describe()
Out[157]:
Rank | Year | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
---|---|---|---|---|---|---|---|
count | 16598.000000 | 16327.000000 | 16598.000000 | 16598.000000 | 16598.000000 | 16598.000000 | 16598.000000 |
mean | 8300.605254 | 2006.406443 | 0.264667 | 0.146652 | 0.077782 | 0.048063 | 0.537441 |
std | 4791.853933 | 5.828981 | 0.816683 | 0.505351 | 0.309291 | 0.188588 | 1.555028 |
min | 1.000000 | 1980.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.010000 |
25% | 4151.250000 | 2003.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.060000 |
50% | 8300.500000 | 2007.000000 | 0.080000 | 0.020000 | 0.000000 | 0.010000 | 0.170000 |
75% | 12449.750000 | 2010.000000 | 0.240000 | 0.110000 | 0.040000 | 0.040000 | 0.470000 |
max | 16600.000000 | 2020.000000 | 41.490000 | 29.020000 | 10.220000 | 10.570000 | 82.740000 |
In [159]:
# Year에 결측치가 존재함을 알 수 있음.
# Year에 결측치가 존재하는 게임의 행 전체를 삭제
df_game_drop = df_game.dropna(subset = ['Year'])
df_game_drop.describe()
Out[159]:
Rank | Year | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
---|---|---|---|---|---|---|---|
count | 16327.000000 | 16327.000000 | 16327.000000 | 16327.000000 | 16327.000000 | 16327.000000 | 16327.000000 |
mean | 8292.868194 | 2006.406443 | 0.265415 | 0.147554 | 0.078661 | 0.048325 | 0.540232 |
std | 4792.669778 | 5.828981 | 0.821591 | 0.508766 | 0.311557 | 0.189885 | 1.565732 |
min | 1.000000 | 1980.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.010000 |
25% | 4136.500000 | 2003.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.060000 |
50% | 8295.000000 | 2007.000000 | 0.080000 | 0.020000 | 0.000000 | 0.010000 | 0.170000 |
75% | 12441.500000 | 2010.000000 | 0.240000 | 0.110000 | 0.040000 | 0.040000 | 0.480000 |
max | 16600.000000 | 2020.000000 | 41.490000 | 29.020000 | 10.220000 | 10.570000 | 82.740000 |
In [163]:
# groupby 실시
year = df_game_drop[['Year', 'Global_Sales']].groupby(['Year']).sum()
year
Out[163]:
Global_Sales | |
---|---|
Year | |
1980.0 | 11.38 |
1981.0 | 35.77 |
1982.0 | 28.86 |
1983.0 | 16.79 |
1984.0 | 50.36 |
1985.0 | 53.94 |
1986.0 | 37.07 |
1987.0 | 21.74 |
1988.0 | 47.22 |
1989.0 | 73.45 |
1990.0 | 49.39 |
1991.0 | 32.23 |
1992.0 | 76.16 |
1993.0 | 45.98 |
1994.0 | 79.17 |
1995.0 | 88.11 |
1996.0 | 199.15 |
1997.0 | 200.98 |
1998.0 | 256.47 |
1999.0 | 251.27 |
2000.0 | 201.56 |
2001.0 | 331.47 |
2002.0 | 395.52 |
2003.0 | 357.85 |
2004.0 | 419.31 |
2005.0 | 459.94 |
2006.0 | 521.04 |
2007.0 | 611.13 |
2008.0 | 678.90 |
2009.0 | 667.30 |
2010.0 | 600.45 |
2011.0 | 515.99 |
2012.0 | 363.54 |
2013.0 | 368.11 |
2014.0 | 337.05 |
2015.0 | 264.44 |
2016.0 | 70.93 |
2017.0 | 0.05 |
2020.0 | 0.29 |
In [188]:
year_x = year['Global_Sales'].keys()
year_y = year['Global_Sales']
sns.set(font_scale = 2)
plt.figure(figsize = (20, 10))
plot3 = sns.lineplot(
x = year_x,
y = year_y,
data = year)
plot3.set_title(
"Global_Sale vs Year",
fontsize = 30)
plt.show()
- 분석 결과, 가장 많은 게임 판매량을 나타내는 연도는 2000 ~ 2010년이다.
- 따라서, "가설3.게임이 가장 많이 판매됬던 시기는 2010년대(2010 ~ 2019)일 것이다.(global sales 기준)"는 내용은 거짓이다.
'전문지식 함양 > TIL' 카테고리의 다른 글
[프로그래머스 겨울방학 인공지능 과정] numpy 복습 (0) | 2022.01.17 |
---|---|
[프로그래머스 겨울방학 인공지능 과정] EDA Project2 (0) | 2022.01.15 |
[프로그래머스 겨울방학 인공지능 과정] EDA example (0) | 2022.01.13 |
[프로그래머스 겨울방학 인공지능 과정] FLASK 실습 (0) | 2022.01.13 |
[프로그래머스 겨울방학 인공지능 과정] Flask with REST API (0) | 2022.01.11 |