+ 2

Collecting Data

I'm trying to output the contents from a table in python. It displays the game consoles but doesn't show the number of units sold. Can someone help me, please? Code: import pandas as pd table = pd.read_html("https://www.statista.com/statistics/268966/total-number-of-game-consoles-sold-worldwide-by-console-type/") print(table[0]) Output: Unnamed: 0 ... Unnamed: 2 0 PlayStation 2 ... NaN 1 Nintendo DS ... NaN 2 Game Boy ... NaN 3 PlayStation ... NaN 4 Nintendo Wii ... NaN 5 PlayStation 3 ... NaN 6 Xbox 360 ... NaN 7 Game Boy Advance ... NaN 8 PlayStation Portable ... NaN 9 Nintendo 3DS ... NaN 10 Playstation 4 ... NaN 11 NES ... NaN 12 Super Nintendo Entertainment System (SNES) ... NaN 13 Nintendo 64 ... NaN 14 Xbox ONE ... NaN 15 Sega Genesis ... NaN 16 Atari 2600 ... NaN 17 Xbox ... NaN 18 GameCube ... NaN 19 PS Vita ... NaN 20 Wii U ... NaN 21

22nd Oct 2018, 5:11 PM
Anfernee Skinner
Anfernee Skinner - avatar
1 Answer
0
Did you try reading this module’s documentation? I bet you would find answer there.
2nd Nov 2018, 10:27 PM
Eterxoz
Eterxoz - avatar