Minor Changes
This commit is contained in:
134
notebook.ipynb
134
notebook.ipynb
@@ -17,28 +17,126 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 4,
|
||||
"id": "3116b75f",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "ParserError",
|
||||
"evalue": "Error tokenizing data. C error: Expected 1 fields in line 2, saw 473\n",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
|
||||
"\u001b[31mParserError\u001b[39m Traceback (most recent call last)",
|
||||
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[3]\u001b[39m\u001b[32m, line 4\u001b[39m\n\u001b[32m 2\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mpandas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mpd\u001b[39;00m\n\u001b[32m 3\u001b[39m \u001b[38;5;66;03m# load data\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m4\u001b[39m cars = \u001b[43mpd\u001b[49m\u001b[43m.\u001b[49m\u001b[43mread_csv\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43m./steam_games.csv\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43msep\u001b[49m\u001b[43m=\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43m\\\u001b[39;49m\u001b[33;43ms+\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43mheader\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[32m 5\u001b[39m \u001b[38;5;28mprint\u001b[39m(cars.head())\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mc:\\Users\\FlorianSpeicher\\anaconda3\\Lib\\site-packages\\pandas\\io\\parsers\\readers.py:1026\u001b[39m, in \u001b[36mread_csv\u001b[39m\u001b[34m(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, date_format, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options, dtype_backend)\u001b[39m\n\u001b[32m 1013\u001b[39m kwds_defaults = _refine_defaults_read(\n\u001b[32m 1014\u001b[39m dialect,\n\u001b[32m 1015\u001b[39m delimiter,\n\u001b[32m (...)\u001b[39m\u001b[32m 1022\u001b[39m dtype_backend=dtype_backend,\n\u001b[32m 1023\u001b[39m )\n\u001b[32m 1024\u001b[39m kwds.update(kwds_defaults)\n\u001b[32m-> \u001b[39m\u001b[32m1026\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mc:\\Users\\FlorianSpeicher\\anaconda3\\Lib\\site-packages\\pandas\\io\\parsers\\readers.py:626\u001b[39m, in \u001b[36m_read\u001b[39m\u001b[34m(filepath_or_buffer, kwds)\u001b[39m\n\u001b[32m 623\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m parser\n\u001b[32m 625\u001b[39m \u001b[38;5;28;01mwith\u001b[39;00m parser:\n\u001b[32m--> \u001b[39m\u001b[32m626\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mparser\u001b[49m\u001b[43m.\u001b[49m\u001b[43mread\u001b[49m\u001b[43m(\u001b[49m\u001b[43mnrows\u001b[49m\u001b[43m)\u001b[49m\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mc:\\Users\\FlorianSpeicher\\anaconda3\\Lib\\site-packages\\pandas\\io\\parsers\\readers.py:1923\u001b[39m, in \u001b[36mTextFileReader.read\u001b[39m\u001b[34m(self, nrows)\u001b[39m\n\u001b[32m 1916\u001b[39m nrows = validate_integer(\u001b[33m\"\u001b[39m\u001b[33mnrows\u001b[39m\u001b[33m\"\u001b[39m, nrows)\n\u001b[32m 1917\u001b[39m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[32m 1918\u001b[39m \u001b[38;5;66;03m# error: \"ParserBase\" has no attribute \"read\"\u001b[39;00m\n\u001b[32m 1919\u001b[39m (\n\u001b[32m 1920\u001b[39m index,\n\u001b[32m 1921\u001b[39m columns,\n\u001b[32m 1922\u001b[39m col_dict,\n\u001b[32m-> \u001b[39m\u001b[32m1923\u001b[39m ) = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_engine\u001b[49m\u001b[43m.\u001b[49m\u001b[43mread\u001b[49m\u001b[43m(\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;66;43;03m# type: ignore[attr-defined]\u001b[39;49;00m\n\u001b[32m 1924\u001b[39m \u001b[43m \u001b[49m\u001b[43mnrows\u001b[49m\n\u001b[32m 1925\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 1926\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m:\n\u001b[32m 1927\u001b[39m \u001b[38;5;28mself\u001b[39m.close()\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mc:\\Users\\FlorianSpeicher\\anaconda3\\Lib\\site-packages\\pandas\\io\\parsers\\c_parser_wrapper.py:234\u001b[39m, in \u001b[36mCParserWrapper.read\u001b[39m\u001b[34m(self, nrows)\u001b[39m\n\u001b[32m 232\u001b[39m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[32m 233\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m.low_memory:\n\u001b[32m--> \u001b[39m\u001b[32m234\u001b[39m chunks = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_reader\u001b[49m\u001b[43m.\u001b[49m\u001b[43mread_low_memory\u001b[49m\u001b[43m(\u001b[49m\u001b[43mnrows\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 235\u001b[39m \u001b[38;5;66;03m# destructive to chunks\u001b[39;00m\n\u001b[32m 236\u001b[39m data = _concatenate_chunks(chunks)\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mparsers.pyx:838\u001b[39m, in \u001b[36mpandas._libs.parsers.TextReader.read_low_memory\u001b[39m\u001b[34m()\u001b[39m\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mparsers.pyx:905\u001b[39m, in \u001b[36mpandas._libs.parsers.TextReader._read_rows\u001b[39m\u001b[34m()\u001b[39m\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mparsers.pyx:874\u001b[39m, in \u001b[36mpandas._libs.parsers.TextReader._tokenize_rows\u001b[39m\u001b[34m()\u001b[39m\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mparsers.pyx:891\u001b[39m, in \u001b[36mpandas._libs.parsers.TextReader._check_tokenize_status\u001b[39m\u001b[34m()\u001b[39m\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mparsers.pyx:2061\u001b[39m, in \u001b[36mpandas._libs.parsers.raise_parser_error\u001b[39m\u001b[34m()\u001b[39m\n",
|
||||
"\u001b[31mParserError\u001b[39m: Error tokenizing data. C error: Expected 1 fields in line 2, saw 473\n"
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" 0 1 \\\n",
|
||||
"0 url types \n",
|
||||
"1 https://store.steampowered.com/app/379720/DOOM/ app \n",
|
||||
"2 https://store.steampowered.com/app/578080/PLAY... app \n",
|
||||
"3 https://store.steampowered.com/app/637090/BATT... app \n",
|
||||
"4 https://store.steampowered.com/app/221100/DayZ/ app \n",
|
||||
"\n",
|
||||
" 2 \\\n",
|
||||
"0 name \n",
|
||||
"1 DOOM \n",
|
||||
"2 PLAYERUNKNOWN'S BATTLEGROUNDS \n",
|
||||
"3 BATTLETECH \n",
|
||||
"4 DayZ \n",
|
||||
"\n",
|
||||
" 3 \\\n",
|
||||
"0 desc_snippet \n",
|
||||
"1 Now includes all three premium DLC packs (Unto... \n",
|
||||
"2 PLAYERUNKNOWN'S BATTLEGROUNDS is a battle roya... \n",
|
||||
"3 Take command of your own mercenary outfit of '... \n",
|
||||
"4 The post-soviet country of Chernarus is struck... \n",
|
||||
"\n",
|
||||
" 4 \\\n",
|
||||
"0 recent_reviews \n",
|
||||
"1 Very Positive,(554),- 89% of the 554 user revi... \n",
|
||||
"2 Mixed,(6,214),- 49% of the 6,214 user reviews ... \n",
|
||||
"3 Mixed,(166),- 54% of the 166 user reviews in t... \n",
|
||||
"4 Mixed,(932),- 57% of the 932 user reviews in t... \n",
|
||||
"\n",
|
||||
" 5 6 \\\n",
|
||||
"0 all_reviews release_date \n",
|
||||
"1 Very Positive,(42,550),- 92% of the 42,550 use... May 12, 2016 \n",
|
||||
"2 Mixed,(836,608),- 49% of the 836,608 user revi... Dec 21, 2017 \n",
|
||||
"3 Mostly Positive,(7,030),- 71% of the 7,030 use... Apr 24, 2018 \n",
|
||||
"4 Mixed,(167,115),- 61% of the 167,115 user revi... Dec 13, 2018 \n",
|
||||
"\n",
|
||||
" 7 8 \\\n",
|
||||
"0 developer publisher \n",
|
||||
"1 id Software Bethesda Softworks,Bethesda Softworks \n",
|
||||
"2 PUBG Corporation PUBG Corporation,PUBG Corporation \n",
|
||||
"3 Harebrained Schemes Paradox Interactive,Paradox Interactive \n",
|
||||
"4 Bohemia Interactive Bohemia Interactive,Bohemia Interactive \n",
|
||||
"\n",
|
||||
" 9 \\\n",
|
||||
"0 popular_tags \n",
|
||||
"1 FPS,Gore,Action,Demons,Shooter,First-Person,Gr... \n",
|
||||
"2 Survival,Shooter,Multiplayer,Battle Royale,PvP... \n",
|
||||
"3 Mechs,Strategy,Turn-Based,Turn-Based Tactics,S... \n",
|
||||
"4 Survival,Zombies,Open World,Multiplayer,PvP,Ma... \n",
|
||||
"\n",
|
||||
" 10 \\\n",
|
||||
"0 game_details \n",
|
||||
"1 Single-player,Multi-player,Co-op,Steam Achieve... \n",
|
||||
"2 Multi-player,Online Multi-Player,Stats \n",
|
||||
"3 Single-player,Multi-player,Online Multi-Player... \n",
|
||||
"4 Multi-player,Online Multi-Player,Steam Worksho... \n",
|
||||
"\n",
|
||||
" 11 12 \\\n",
|
||||
"0 languages achievements \n",
|
||||
"1 English,French,Italian,German,Spanish - Spain,... 54 \n",
|
||||
"2 English,Korean,Simplified Chinese,French,Germa... 37 \n",
|
||||
"3 English,French,German,Russian 128 \n",
|
||||
"4 English,French,Italian,German,Spanish - Spain,... NaN \n",
|
||||
"\n",
|
||||
" 13 \\\n",
|
||||
"0 genre \n",
|
||||
"1 Action \n",
|
||||
"2 Action,Adventure,Massively Multiplayer \n",
|
||||
"3 Action,Adventure,Strategy \n",
|
||||
"4 Action,Adventure,Massively Multiplayer \n",
|
||||
"\n",
|
||||
" 14 \\\n",
|
||||
"0 game_description \n",
|
||||
"1 About This Game Developed by id software, the... \n",
|
||||
"2 About This Game PLAYERUNKNOWN'S BATTLEGROUND... \n",
|
||||
"3 About This Game From original BATTLETECH/Mec... \n",
|
||||
"4 About This Game The post-soviet country of Ch... \n",
|
||||
"\n",
|
||||
" 15 \\\n",
|
||||
"0 mature_content \n",
|
||||
"1 NaN \n",
|
||||
"2 Mature Content Description The developers de... \n",
|
||||
"3 NaN \n",
|
||||
"4 NaN \n",
|
||||
"\n",
|
||||
" 16 \\\n",
|
||||
"0 minimum_requirements \n",
|
||||
"1 Minimum:,OS:,Windows 7/8.1/10 (64-bit versions... \n",
|
||||
"2 Minimum:,Requires a 64-bit processor and opera... \n",
|
||||
"3 Minimum:,Requires a 64-bit processor and opera... \n",
|
||||
"4 Minimum:,OS:,Windows 7/8.1 64-bit,Processor:,I... \n",
|
||||
"\n",
|
||||
" 17 18 \\\n",
|
||||
"0 recommended_requirements original_price \n",
|
||||
"1 Recommended:,OS:,Windows 7/8.1/10 (64-bit vers... $19.99 \n",
|
||||
"2 Recommended:,Requires a 64-bit processor and o... $29.99 \n",
|
||||
"3 Recommended:,Requires a 64-bit processor and o... $39.99 \n",
|
||||
"4 Recommended:,OS:,Windows 10 64-bit,Processor:,... $44.99 \n",
|
||||
"\n",
|
||||
" 19 \n",
|
||||
"0 discount_price \n",
|
||||
"1 $14.99 \n",
|
||||
"2 NaN \n",
|
||||
"3 NaN \n",
|
||||
"4 NaN \n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"C:\\Users\\FlorianSpeicher\\AppData\\Local\\Temp\\ipykernel_38708\\931669033.py:4: DtypeWarning: Columns (12) have mixed types. Specify dtype option on import or set low_memory=False.\n",
|
||||
" cars = pd.read_csv(\"./steam_games.csv\",sep=\",\",header=None)\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user