I am not done with the argument project, but I've hit a barrier. I keep getting error

messages. Getting a bit frustrated tonight, so I'm takaing a break.
This commit is contained in:
Heather
2025-11-03 19:34:47 -05:00
parent 6b66d5d9c7
commit 059fd8fabe
3 changed files with 572 additions and 25 deletions

View File

@@ -16,6 +16,16 @@
"*✏️ Write 2-3 sentences describing your research.*"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "16a88343-24ed-4a92-ae55-6cfd5d6b0eda",
"metadata": {},
"outputs": [],
"source": [
"#I am going to extract the first 15 rows from Fast_Food_dataset and analyze which foods wood be the better options if eating at one of these restaurants"
]
},
{
"cell_type": "markdown",
"id": "greater-circular",
@@ -32,6 +42,26 @@
"*✏️ Write 2-3 sentences explaining why this question.*"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5c1d1224-0292-4205-800f-ce0c75316075",
"metadata": {},
"outputs": [],
"source": [
"#Overarching Question: Are there healthy options at fast food restaurants?"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "37ad7c41-817d-47ce-9aeb-b3b58b5e7761",
"metadata": {},
"outputs": [],
"source": [
"#I chose this question becuase I generally try to eat healthy. Sometimes quick meals are a necesity. I am curious if common fast food restaurants truly offer healthier options "
]
},
{
"cell_type": "markdown",
"id": "permanent-pollution",
@@ -42,39 +72,44 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"id": "technical-evans",
"metadata": {},
"outputs": [],
"source": [
"#Include any import statements you will need\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt"
"\n",
"#python\n",
"\n",
"def pandas(pd):\n",
" import pandas as pd\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"id": "overhead-sigma",
"metadata": {},
"outputs": [],
"source": [
"### 💻 FILL IN YOUR DATASET FILE NAME BELOW 💻 ###\n",
"\n",
"file_name = \"YOUR_DATASET_FILE_NAME.csv\"\n",
"dataset_path = \"data/\" + file_name\n",
"\n",
"df = pd.read_csv(dataset_path)"
"# Load the dataset\n",
"def pandas(pd):\n",
" file_path = 'Fast_Food_Dataset/nutrition.csv' # Update this with the correct path\n",
" data = pd.read_csv(file_path)"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 14,
"id": "heated-blade",
"metadata": {},
"outputs": [],
"source": [
"df.head()"
"#check first 15 rows\n",
"def data (read_csv):\n",
" data.head(15)"
]
},
{
@@ -83,7 +118,7 @@
"metadata": {},
"source": [
"**Data Overview**\n",
"\n",
"This dataset is showing the first 15 rows of Fast_Food_Dataset. It comes from Kaggle.com and contains nutritional information from fast food restaurants.\n",
"*✏️ Write 2-3 sentences describing this dataset. Be sure to include where the data comes from and what it contains.*"
]
},
@@ -97,20 +132,12 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 15,
"id": "basic-canadian",
"metadata": {},
"outputs": [],
"source": [
"#Import any helper files you need here"
]
},
{
"cell_type": "markdown",
"id": "recognized-positive",
"metadata": {},
"source": [
"## First Research Question: [✏️ PUT YOUR QUESTION HERE ✏️]\n"
"#Import any helper files you need here\n"
]
},
{
@@ -135,6 +162,33 @@
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0e3d2271-0361-4d42-a237-eff6b909c7b3",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 16,
"id": "44d5cdff-d651-46b8-8ee9-6bd6019c96c8",
"metadata": {},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (339389244.py, line 1)",
"output_type": "error",
"traceback": [
"\u001b[0;36m Cell \u001b[0;32mIn[16], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m I will use rows 1-15\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"I will use rows 1-15 \n"
]
},
{
"cell_type": "markdown",
"id": "portuguese-japan",
@@ -145,13 +199,25 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 2,
"id": "negative-highlight",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'data' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[2], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m#######################################################################\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m#import rows 1-15\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m \u001b[43mdata\u001b[49m\u001b[38;5;241m.\u001b[39mhead()\n\u001b[1;32m 4\u001b[0m \u001b[38;5;66;03m### \u001b[39;00m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;66;03m### Your data analysis may include a statistic and/or a data visualization\u001b[39;00m\n\u001b[1;32m 6\u001b[0m \u001b[38;5;66;03m#######################################################################\u001b[39;00m\n",
"\u001b[0;31mNameError\u001b[0m: name 'data' is not defined"
]
}
],
"source": [
"#######################################################################\n",
"### 💻 YOUR WORK GOES HERE TO ANSWER THE FIRST RESEARCH QUESTION 💻 \n",
"\n",
"### \n",
"### Your data analysis may include a statistic and/or a data visualization\n",
"#######################################################################"
@@ -310,7 +376,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.12.3"
},
"toc": {
"base_numbering": 1,