Integrating the data in the note book YIPPEEEE
This commit is contained in:
@@ -36,9 +36,9 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"from tkinter.filedialog import askopenfilename\n",
|
||||
"filename = askopenfilename()\n",
|
||||
"df1= pd.read_csv(filename)\n",
|
||||
"from tkinter.filedialog import askopenfilename"
|
||||
"df1= pd.read_csv(filename)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -64,27 +64,9 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 23,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" Name\n",
|
||||
"0 Baldur's Gate 3 Early Access \n",
|
||||
"1 Control: Ultimate Edition Cloud Version \n",
|
||||
"2 Doom Eternal: The Ancient Gods Part 1 \n",
|
||||
"3 Watch Dogs: Legion \n",
|
||||
"4 Ring Of Pain \n",
|
||||
"5 Pikmin 3 Deluxe \n",
|
||||
"6 Ghostrunner \n",
|
||||
"7 Disc Room \n",
|
||||
"8 NHL 21 \n",
|
||||
"9 Noita \n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# CLeaning\n",
|
||||
"nuke=df1['GameName'].to_list()\n",
|
||||
@@ -121,7 +103,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Integrating Game Sales with the previous cleaned data set"
|
||||
"# Integrating Game Datasets together"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -129,7 +111,42 @@
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
"source": [
|
||||
"\n",
|
||||
"filename = askopenfilename()\n",
|
||||
"df2 = pd.read_csv(filename)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# merged = pd.merge(df1,df2, how='inner', sort=True) DOES NOT WORK\n",
|
||||
"# print(merged.head(10))\n",
|
||||
"merged = df2.join(df1, lsuffix='merged') #Good\n",
|
||||
"print(merged.head(10))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"merged2.to_csv('merged_games.csv')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(df1[['Name']].head(100))\n",
|
||||
"print(df2[['Name']].head(100))"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in New Issue
Block a user