Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 23 additions & 34 deletions FeatureEngineering/DB_FeatureEngineering1.ipynb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "756b4af0",
"execution_count": 3,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'tensorflow'",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m~\\AppData\\Local\\Temp/ipykernel_85224/4219686290.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 12\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mmath\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0msqrt\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 13\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 14\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mtensorflow\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mtf\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 15\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 16\u001b[0m \u001b[1;31m# Keras specific\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'tensorflow'"
],
"output_type": "error"
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
Expand All @@ -31,7 +42,6 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "3dc2fae7",
"metadata": {
"scrolled": true
},
Expand All @@ -42,22 +52,25 @@
},
{
"cell_type": "code",
"execution_count": 3,
"id": "424466af",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"#load data from data files and place into panda dataframes\n",
"custOrders = pd.read_csv('data/customer_orders.csv', low_memory=False)\n",
"temp2 = pd.read_csv('data/item_ingredients.csv', low_memory=False)\n",
"\n",
"try:\n",
" custOrders = pd.read_csv('data/customer_orders.csv', low_memory=False)\n",
" temp2 = pd.read_csv('data/item_ingredients.csv', low_memory=False)\n",
"except FileNotFoundError:\n",
" c_order_url = \"https://raw.githubusercontent.com/GottaGitGoing/cs180_2/main/FeatureEngineering/data/customer_orders.csv\"\n",
" ingred_url = \"https://raw.githubusercontent.com/GottaGitGoing/cs180_2/main/FeatureEngineering/data/item_ingredients.csv\"\n",
" custOrders = pd.read_csv(c_order_url, low_memory=False)\n",
" temp2 = pd.read_csv(ingred_url, low_memory=False)\n",
"#temp2.head(10)\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "930462cc",
"metadata": {},
"outputs": [
{
Expand All @@ -82,7 +95,6 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "a397d1f3",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -123,7 +135,6 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "bcb78d34",
"metadata": {
"scrolled": true
},
Expand All @@ -148,7 +159,6 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "51657c7f",
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -336,7 +346,6 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "41d402ed",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -520,7 +529,6 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "1e4230cc",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -545,7 +553,6 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "c1f14dd0",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -571,7 +578,6 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "ee755b25",
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -988,7 +994,6 @@
{
"cell_type": "code",
"execution_count": 12,
"id": "471ddcc9",
"metadata": {},
"outputs": [
{
Expand All @@ -1010,7 +1015,6 @@
{
"cell_type": "code",
"execution_count": 13,
"id": "69e86727",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1037,7 +1041,6 @@
{
"cell_type": "code",
"execution_count": 14,
"id": "c1e36854",
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -1331,7 +1334,6 @@
{
"cell_type": "code",
"execution_count": 15,
"id": "556b6059",
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -1506,7 +1508,6 @@
{
"cell_type": "code",
"execution_count": 16,
"id": "98c25c78",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1555,7 +1556,6 @@
{
"cell_type": "code",
"execution_count": 17,
"id": "736b10a3",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1914,7 +1914,6 @@
{
"cell_type": "code",
"execution_count": 18,
"id": "85955bdd",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1939,7 +1938,6 @@
{
"cell_type": "code",
"execution_count": 19,
"id": "a0f9ecd7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1953,7 +1951,6 @@
{
"cell_type": "code",
"execution_count": 20,
"id": "cf656e7d",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1968,7 +1965,6 @@
{
"cell_type": "code",
"execution_count": 21,
"id": "eb8a4c34",
"metadata": {},
"outputs": [
{
Expand All @@ -1993,7 +1989,6 @@
{
"cell_type": "code",
"execution_count": 22,
"id": "dfb6d45e",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -2004,7 +1999,6 @@
{
"cell_type": "code",
"execution_count": 23,
"id": "4ac99c03",
"metadata": {},
"outputs": [
{
Expand All @@ -2025,7 +2019,6 @@
{
"cell_type": "code",
"execution_count": 24,
"id": "4186cf86",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -2041,7 +2034,6 @@
{
"cell_type": "code",
"execution_count": 25,
"id": "26e33f9a",
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -2280,7 +2272,6 @@
{
"cell_type": "code",
"execution_count": 26,
"id": "f4247c08",
"metadata": {},
"outputs": [
{
Expand All @@ -2302,7 +2293,6 @@
{
"cell_type": "code",
"execution_count": 27,
"id": "69297008",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -2332,7 +2322,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3aeeb1f8",
"metadata": {},
"outputs": [],
"source": []
Expand Down
22 changes: 22 additions & 0 deletions SQL/CSVs/itemrestrictions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
item_id,dairy,nuts,vegan,vegetarian,kosher,halal
640404923,0,0,0,0,0,0
640404963,0,0,0,0,0,0
640405025,0,0,0,0,0,0
640405058,0,1,1,1,0,0
640405085,0,0,0,0,0,0
640405112,0,0,0,0,0,0
640405172,0,0,0,0,0,0
640405355,0,0,1,1,1,1
640405371,0,0,1,1,1,1
640405380,0,0,1,1,1,1
640405389,1,1,0,0,1,1
640405395,1,1,0,0,1,1
640405399,1,1,0,0,1,1
640405296,0,0,1,1,1,1
640405307,0,0,1,1,1,1
640405315,0,0,1,1,1,1
640405323,0,0,1,1,1,1
640405331,0,0,1,1,1,1
640405339,0,0,1,1,1,1
640405347,0,0,1,1,1,1
640405348,0,0,1,1,1,1
Loading