1151 lines
564 KiB
Plaintext
1151 lines
564 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 10,
|
||
|
"id": "b20887f4-26bf-4f39-babe-089e84be7e8e",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import pandas as pd\n",
|
||
|
"df=pd.read_csv('OrangeQualityData.csv')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 11,
|
||
|
"id": "eacde0af-a356-4520-86d3-3f0946e7ba93",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div>\n",
|
||
|
"<style scoped>\n",
|
||
|
" .dataframe tbody tr th:only-of-type {\n",
|
||
|
" vertical-align: middle;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe tbody tr th {\n",
|
||
|
" vertical-align: top;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe thead th {\n",
|
||
|
" text-align: right;\n",
|
||
|
" }\n",
|
||
|
"</style>\n",
|
||
|
"<table border=\"1\" class=\"dataframe\">\n",
|
||
|
" <thead>\n",
|
||
|
" <tr style=\"text-align: right;\">\n",
|
||
|
" <th></th>\n",
|
||
|
" <th>Size (cm)</th>\n",
|
||
|
" <th>Weight (g)</th>\n",
|
||
|
" <th>Brix (Sweetness)</th>\n",
|
||
|
" <th>pH (Acidity)</th>\n",
|
||
|
" <th>Softness (1-5)</th>\n",
|
||
|
" <th>HarvestTime (days)</th>\n",
|
||
|
" <th>Ripeness (1-5)</th>\n",
|
||
|
" <th>Color</th>\n",
|
||
|
" <th>Variety</th>\n",
|
||
|
" <th>Blemishes (Y/N)</th>\n",
|
||
|
" <th>Quality (1-5)</th>\n",
|
||
|
" </tr>\n",
|
||
|
" </thead>\n",
|
||
|
" <tbody>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>count</th>\n",
|
||
|
" <td>241.000000</td>\n",
|
||
|
" <td>241.000000</td>\n",
|
||
|
" <td>241.000000</td>\n",
|
||
|
" <td>241.000000</td>\n",
|
||
|
" <td>241.000000</td>\n",
|
||
|
" <td>241.000000</td>\n",
|
||
|
" <td>241.000000</td>\n",
|
||
|
" <td>241</td>\n",
|
||
|
" <td>241</td>\n",
|
||
|
" <td>241</td>\n",
|
||
|
" <td>241.000000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>unique</th>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>5</td>\n",
|
||
|
" <td>24</td>\n",
|
||
|
" <td>12</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>top</th>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>Deep Orange</td>\n",
|
||
|
" <td>Cara Cara</td>\n",
|
||
|
" <td>N</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>freq</th>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>75</td>\n",
|
||
|
" <td>21</td>\n",
|
||
|
" <td>149</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>mean</th>\n",
|
||
|
" <td>7.844813</td>\n",
|
||
|
" <td>205.128631</td>\n",
|
||
|
" <td>10.907884</td>\n",
|
||
|
" <td>3.473900</td>\n",
|
||
|
" <td>3.072614</td>\n",
|
||
|
" <td>15.344398</td>\n",
|
||
|
" <td>3.599585</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>3.817427</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>std</th>\n",
|
||
|
" <td>1.086002</td>\n",
|
||
|
" <td>56.461012</td>\n",
|
||
|
" <td>2.760446</td>\n",
|
||
|
" <td>0.421007</td>\n",
|
||
|
" <td>1.323630</td>\n",
|
||
|
" <td>5.323852</td>\n",
|
||
|
" <td>1.205214</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>1.014410</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>min</th>\n",
|
||
|
" <td>6.000000</td>\n",
|
||
|
" <td>100.000000</td>\n",
|
||
|
" <td>5.500000</td>\n",
|
||
|
" <td>2.800000</td>\n",
|
||
|
" <td>1.000000</td>\n",
|
||
|
" <td>4.000000</td>\n",
|
||
|
" <td>1.000000</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>1.000000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>25%</th>\n",
|
||
|
" <td>6.900000</td>\n",
|
||
|
" <td>155.000000</td>\n",
|
||
|
" <td>8.500000</td>\n",
|
||
|
" <td>3.200000</td>\n",
|
||
|
" <td>2.000000</td>\n",
|
||
|
" <td>11.000000</td>\n",
|
||
|
" <td>3.000000</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>3.000000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>50%</th>\n",
|
||
|
" <td>7.800000</td>\n",
|
||
|
" <td>205.000000</td>\n",
|
||
|
" <td>11.000000</td>\n",
|
||
|
" <td>3.400000</td>\n",
|
||
|
" <td>3.000000</td>\n",
|
||
|
" <td>15.000000</td>\n",
|
||
|
" <td>4.000000</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>4.000000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>75%</th>\n",
|
||
|
" <td>8.700000</td>\n",
|
||
|
" <td>252.000000</td>\n",
|
||
|
" <td>13.400000</td>\n",
|
||
|
" <td>3.800000</td>\n",
|
||
|
" <td>4.000000</td>\n",
|
||
|
" <td>20.000000</td>\n",
|
||
|
" <td>4.500000</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>4.500000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>max</th>\n",
|
||
|
" <td>10.000000</td>\n",
|
||
|
" <td>300.000000</td>\n",
|
||
|
" <td>16.000000</td>\n",
|
||
|
" <td>4.400000</td>\n",
|
||
|
" <td>5.000000</td>\n",
|
||
|
" <td>25.000000</td>\n",
|
||
|
" <td>5.000000</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>5.000000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" </tbody>\n",
|
||
|
"</table>\n",
|
||
|
"</div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
" Size (cm) Weight (g) Brix (Sweetness) pH (Acidity) \\\n",
|
||
|
"count 241.000000 241.000000 241.000000 241.000000 \n",
|
||
|
"unique NaN NaN NaN NaN \n",
|
||
|
"top NaN NaN NaN NaN \n",
|
||
|
"freq NaN NaN NaN NaN \n",
|
||
|
"mean 7.844813 205.128631 10.907884 3.473900 \n",
|
||
|
"std 1.086002 56.461012 2.760446 0.421007 \n",
|
||
|
"min 6.000000 100.000000 5.500000 2.800000 \n",
|
||
|
"25% 6.900000 155.000000 8.500000 3.200000 \n",
|
||
|
"50% 7.800000 205.000000 11.000000 3.400000 \n",
|
||
|
"75% 8.700000 252.000000 13.400000 3.800000 \n",
|
||
|
"max 10.000000 300.000000 16.000000 4.400000 \n",
|
||
|
"\n",
|
||
|
" Softness (1-5) HarvestTime (days) Ripeness (1-5) Color \\\n",
|
||
|
"count 241.000000 241.000000 241.000000 241 \n",
|
||
|
"unique NaN NaN NaN 5 \n",
|
||
|
"top NaN NaN NaN Deep Orange \n",
|
||
|
"freq NaN NaN NaN 75 \n",
|
||
|
"mean 3.072614 15.344398 3.599585 NaN \n",
|
||
|
"std 1.323630 5.323852 1.205214 NaN \n",
|
||
|
"min 1.000000 4.000000 1.000000 NaN \n",
|
||
|
"25% 2.000000 11.000000 3.000000 NaN \n",
|
||
|
"50% 3.000000 15.000000 4.000000 NaN \n",
|
||
|
"75% 4.000000 20.000000 4.500000 NaN \n",
|
||
|
"max 5.000000 25.000000 5.000000 NaN \n",
|
||
|
"\n",
|
||
|
" Variety Blemishes (Y/N) Quality (1-5) \n",
|
||
|
"count 241 241 241.000000 \n",
|
||
|
"unique 24 12 NaN \n",
|
||
|
"top Cara Cara N NaN \n",
|
||
|
"freq 21 149 NaN \n",
|
||
|
"mean NaN NaN 3.817427 \n",
|
||
|
"std NaN NaN 1.014410 \n",
|
||
|
"min NaN NaN 1.000000 \n",
|
||
|
"25% NaN NaN 3.000000 \n",
|
||
|
"50% NaN NaN 4.000000 \n",
|
||
|
"75% NaN NaN 4.500000 \n",
|
||
|
"max NaN NaN 5.000000 "
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 11,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df.describe(include='all')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 12,
|
||
|
"id": "a6b24d80-a8d1-460a-b723-ee3ad2573f49",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Variety\n",
|
||
|
"Cara Cara 21\n",
|
||
|
"Temple 18\n",
|
||
|
"Star Ruby 18\n",
|
||
|
"Navel 16\n",
|
||
|
"Moro (Blood) 16\n",
|
||
|
"Tangerine 14\n",
|
||
|
"Clementine 14\n",
|
||
|
"Washington Navel 14\n",
|
||
|
"Satsuma Mandarin 13\n",
|
||
|
"Ortanique (Hybrid) 13\n",
|
||
|
"Minneola (Hybrid) 12\n",
|
||
|
"Jaffa 11\n",
|
||
|
"Ambiance 11\n",
|
||
|
"Valencia 11\n",
|
||
|
"California Valencia 7\n",
|
||
|
"Honey Tangerine 7\n",
|
||
|
"Hamlin 5\n",
|
||
|
"Midsweet (Hybrid) 5\n",
|
||
|
"Clementine (Seedless) 4\n",
|
||
|
"Murcott (Hybrid) 3\n",
|
||
|
"Navel (Late Season) 3\n",
|
||
|
"Blood Orange 2\n",
|
||
|
"Navel (Early Season) 2\n",
|
||
|
"Tangelo (Hybrid) 1\n",
|
||
|
"Name: count, dtype: int64"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 12,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df[\"Variety\"].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 13,
|
||
|
"id": "69623b00-d707-48ad-b639-cea488ff7004",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<Axes: xlabel='Variety'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 13,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiwAAAI+CAYAAACfaVF5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAC0kklEQVR4nOzdd1xT1/8/8FcYMpQlKENRRATBiXvV4sRRt9bWXdyte1P3HnWPuhVH3bu1HxUHuPfeiAO31lZRUBR4//7wR76EZRJuaqSv5+ORx8Pc3PvmxCQ375x7zvuoRERAREREZMRMPncDiIiIiD6FCQsREREZPSYsREREZPSYsBAREZHRY8JCRERERo8JCxERERk9JixERERk9Mw+dwOUkpiYiEePHsHGxgYqlepzN4eIiIi0ICJ4/fo13NzcYGKSfj9KlklYHj16BHd398/dDCIiItLD/fv3kTdv3nQfzzIJi42NDYCPT9jW1vYzt4aIiIi0ER0dDXd3d/X3eHqyTMKSdBnI1taWCQsREdEX5lPDOTjoloiIiIweExYiIiIyekxYiIiIyOgxYSEiIiKjx4SFiIiIjB4TFiIiIjJ6TFiIiIjI6DFhISIiIqPHhIWIiIiMHhMWIiIiMnpMWIiIiMjoMWEhIiIio8eEhYiIiIweExYiIiIyekxYiIiIyOiZfe4GGJrHkJ1a7Xd3Un0Dt4SIiIj0xR4WIiIiMnpMWIiIiMjoMWEhIiIio8eEhYiIiIweExYiIiIyekxYiIiIyOgxYSEiIiKjx4SFiIiIjB4TFiIiIjJ6TFiIiIjI6DFhISIiIqPHhIWIiIiMnk4Jy8SJE1G2bFnY2Nggd+7caNy4MW7cuKGxj4hg1KhRcHNzg5WVFQICAnDlypVPxt68eTP8/PxgYWEBP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io8eEhYiIiIweExYiIiIyekxYiIiIyOgxYSEiIiKjZ/a5G0CG4TFkp1b73Z1U/7PGJCIi0gZ7WIiIiMjoMWEhIiIio8eEhYiIiIweExYiIiIyekxYiIiIyOgxYSEiIiKjx4SFiIiIjB4TFiIiIjJ6TFiIiIjI6DFhISIiIqPHhIWIiIiMHhMWIiIiMno6JywHDx5EgwYN4ObmBpVKhW3btmk83qFDB6hUKo1bhQoVPhl38+bN8PPzg4WFBfz8/LB161Zdm0ZERERZlM4JS0xMDEqUKIG5c+emu0+dOnXw+PFj9e3PP//MMOaxY8fQsmVLtG3bFhcuXEDbtm3x7bff4sSJE7o2j4iIiLIgM10PqFu3LurWrZvhPhYWFnBxcdE65syZM1GrVi0EBwcDAIKDgxEeHo6ZM2di7dq1aR4TFxeHuLg49f3o6Git/x4RERF9WQwyhiUsLAy5c+eGt7c3OnfujGfPnmW4/7Fjx1C7dm2NbYGBgTh69Gi6x0ycOBF2dnbqm7u7uyJtJyIiIuOjeMJSt25d/Pbbb9i/fz+mTZuGU6dOoXr16hq9ISk9efIEzs7OGtucnZ3x5MmTdI8JDg7Gq1ev1Lf79+8r9hyIiIjIuOh8SehTWrZsqf530aJFUaZMGeTPnx87d+5E06ZN0z1OpVJp3BeRVNuSs7CwgIWFReYbTEREREbP4NOaXV1dkT9/fkRERKS7j4uLS6relGfPnqXqdSEiIqL/JoMnLC9evMD9+/fh6uqa7j4VK1ZEaGioxrY9e/agUqVKhm4eERERfQF0viT05s0b3Lp1S33/zp07OH/+PHLmzImcOXNi1KhRaNasGVxdXXH37l38/PPPcHJyQpMmTdTHtGvXDnny5MHEiRMBAL1790bVqlUxefJkNGrUCNu3b8fevXtx+PBhBZ4
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df[\"Variety\"].value_counts().plot(kind=\"bar\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 16,
|
||
|
"id": "c18af40e-2b27-4223-871f-840fc2ddec38",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div>\n",
|
||
|
"<style scoped>\n",
|
||
|
" .dataframe tbody tr th:only-of-type {\n",
|
||
|
" vertical-align: middle;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe tbody tr th {\n",
|
||
|
" vertical-align: top;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe thead th {\n",
|
||
|
" text-align: right;\n",
|
||
|
" }\n",
|
||
|
"</style>\n",
|
||
|
"<table border=\"1\" class=\"dataframe\">\n",
|
||
|
" <thead>\n",
|
||
|
" <tr style=\"text-align: right;\">\n",
|
||
|
" <th></th>\n",
|
||
|
" <th>Size (cm)</th>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Variety</th>\n",
|
||
|
" <th></th>\n",
|
||
|
" </tr>\n",
|
||
|
" </thead>\n",
|
||
|
" <tbody>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Ambiance</th>\n",
|
||
|
" <td>7.827273</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Blood Orange</th>\n",
|
||
|
" <td>9.500000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>California Valencia</th>\n",
|
||
|
" <td>7.885714</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Cara Cara</th>\n",
|
||
|
" <td>8.419048</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Clementine</th>\n",
|
||
|
" <td>7.578571</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Clementine (Seedless)</th>\n",
|
||
|
" <td>6.500000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Hamlin</th>\n",
|
||
|
" <td>8.160000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Honey Tangerine</th>\n",
|
||
|
" <td>7.742857</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Jaffa</th>\n",
|
||
|
" <td>7.090909</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Midsweet (Hybrid)</th>\n",
|
||
|
" <td>8.660000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Minneola (Hybrid)</th>\n",
|
||
|
" <td>7.683333</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Moro (Blood)</th>\n",
|
||
|
" <td>8.475000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Murcott (Hybrid)</th>\n",
|
||
|
" <td>7.733333</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Navel</th>\n",
|
||
|
" <td>7.662500</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Navel (Early Season)</th>\n",
|
||
|
" <td>7.850000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Navel (Late Season)</th>\n",
|
||
|
" <td>8.400000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Ortanique (Hybrid)</th>\n",
|
||
|
" <td>7.215385</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Satsuma Mandarin</th>\n",
|
||
|
" <td>7.038462</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Star Ruby</th>\n",
|
||
|
" <td>8.444444</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Tangelo (Hybrid)</th>\n",
|
||
|
" <td>7.200000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Tangerine</th>\n",
|
||
|
" <td>7.607143</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Temple</th>\n",
|
||
|
" <td>7.638889</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Valencia</th>\n",
|
||
|
" <td>7.927273</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>Washington Navel</th>\n",
|
||
|
" <td>8.207143</td>\n",
|
||
|
" </tr>\n",
|
||
|
" </tbody>\n",
|
||
|
"</table>\n",
|
||
|
"</div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
" Size (cm)\n",
|
||
|
"Variety \n",
|
||
|
"Ambiance 7.827273\n",
|
||
|
"Blood Orange 9.500000\n",
|
||
|
"California Valencia 7.885714\n",
|
||
|
"Cara Cara 8.419048\n",
|
||
|
"Clementine 7.578571\n",
|
||
|
"Clementine (Seedless) 6.500000\n",
|
||
|
"Hamlin 8.160000\n",
|
||
|
"Honey Tangerine 7.742857\n",
|
||
|
"Jaffa 7.090909\n",
|
||
|
"Midsweet (Hybrid) 8.660000\n",
|
||
|
"Minneola (Hybrid) 7.683333\n",
|
||
|
"Moro (Blood) 8.475000\n",
|
||
|
"Murcott (Hybrid) 7.733333\n",
|
||
|
"Navel 7.662500\n",
|
||
|
"Navel (Early Season) 7.850000\n",
|
||
|
"Navel (Late Season) 8.400000\n",
|
||
|
"Ortanique (Hybrid) 7.215385\n",
|
||
|
"Satsuma Mandarin 7.038462\n",
|
||
|
"Star Ruby 8.444444\n",
|
||
|
"Tangelo (Hybrid) 7.200000\n",
|
||
|
"Tangerine 7.607143\n",
|
||
|
"Temple 7.638889\n",
|
||
|
"Valencia 7.927273\n",
|
||
|
"Washington Navel 8.207143"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 16,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df[[\"Variety\",\"Size (cm)\"]].groupby(\"Variety\").mean()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 18,
|
||
|
"id": "36a1a169-21c6-4fc3-a9ec-0ac718b88df0",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<Axes: xlabel='Variety'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 18,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAhYAAAI+CAYAAADguEOIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACrcklEQVR4nOzdd1RUV9cG8GfovQh2EUQEQVFRYlSMsWNviTERYwFr7F1jr1FjjRq7ghqNJbbExN5b7L2AWLBrjBUUBfb3hx/zMgI6c7kjYJ7fWrOW3pnZcy4zc2ffc8/ZRyMiAiIiIiIVmGR2A4iIiOjjwcSCiIiIVMPEgoiIiFTDxIKIiIhUw8SCiIiIVMPEgoiIiFTDxIKIiIhUY/ahXzApKQm3b9+Gvb09NBrNh355IiIiUkBE8OzZM+TLlw8mJun3S3zwxOL27dtwc3P70C9LREREKrhx4wYKFCiQ7v0fPLGwt7cH8KZhDg4OH/rliYiISIGnT5/Czc1N+zueng+eWCRf/nBwcGBiQURElM28bxgDB28SERGRaphYEBERkWqYWBAREZFqPvgYCyIi+nglJibi9evXmd0MUsDc3BympqYZjsPEgoiIMkxEcPfuXTx+/Dizm0IZ4OTkhDx58mSozhQTCyIiyr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INUwsiIiISDUGXQohyqqy67Ss/wpe6iT672CPBREREamGPRZE2Rh7aogoq2FiQUTZDhMqoqyLiQUREZE
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df[[\"Variety\",\"Size (cm)\"]].groupby(\"Variety\").mean().plot(kind=\"bar\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 19,
|
||
|
"id": "f07a55ff-c3fd-4c74-8826-8b874e4c1285",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<seaborn.axisgrid.FacetGrid at 0x2ab15b4f150>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 19,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAI2CAYAAAAW++MuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3QU1dvA8e+UremBEEIIHUINvUkPIiBShFhAQEFR7PxUsGMviCKKr4qKigVUBARsKNgAAaUISAs19J6ezZaZef+ILCzZhADJpnA/53A0c+/O3Jmd3X3mVskwDANBEARBEARBCAC5tAsgCIIgCIIgXD5E8CkIgiAIgiAEjAg+BUEQBEEQhIARwacgCIIgCIIQMCL4FARBEARBEAJGBJ+CIAiCIAhCwIjgUxAEQRAEQQgYEXwKgiAIgiAIASOCT0EQBEEQBCFgRPApCIIgCIIgBIwIPgVBEARBEISAEcGnIAiCIAiCEDAi+BQEQRAEQRACRgSfgiAIgiAIQsCI4FMQBEEQhMuCYRilXQQBEXwKgiAIglCMRo0aRbt27XC5XAXmGThwINddd91F7f/AgQPEx8czb968C3rdO++8w4wZMy7qmELxEsGnIAiCIAjFJikpifT0dP744w+/6du2bWPbtm0kJSVd1P6rVKnCl19+Sffu3S/odVOnTsXhcFzUMYXiJYJPQRAEQRCKTa9evQgLC2PhwoV+07/55hvsdjv9+vW7qP2bzWZatGhBZGTkpRRTKEUi+BQEQRAEodiYzWb69+/Pr7/+SmZmpk+apml8++239OnTB5fLxTPPPEOPHj1o2rQp7dq14+677+bAgQPe/CNGjOChhx7ivvvuo1WrVtx+++1+m90PHTrEAw88QLt27WjevDk333wzW7Zs8abHx8cD8NZbbxEfH8+OHTuIj4/nyy+/9Cnf0aNHadSoEfPnzy+JSyP8RwSfgiAIgiAUq6SkJFwuFz/++KPP9uXLl3P8+HGSkpK44447WLFiBQ8++CAzZszgrrvu4s8//2TixIk+r/nhhx8wmUz83//9HyNHjsx3rFOnTnHjjTeyefNmnnzySV577TV0Xeemm25i165dAN4gMykpiS+//JL69evTvHlzFixY4LOvBQsWYLVa6d27d3FeDuEcamkXQBAEQRCEiqVRo0Y0btyYRYsW+Qwsmj9/PnXr1qV69erYbDYefvhh2rRpA0D79u05cOAAX3zxhc++ZFnmueeew263A/jUjALMnDmTtLQ0Zs+eTWxsLABdu3bl6quv5o033uDNN9+kRYsWAFStWtX7/0OGDGHixIns37+fuLg4IK9LQN++fb3HEkqGqPkUBEEQBKHYJSUl8ffff3PkyBEAMjMz+eWXX0hKSiI6OppPPvmENm3acOjQIVauXMlnn33GunXrcLvdPvupXr16ocHgypUradSoEdHR0Xg8HjweD7Is07VrV/78888CX9evXz9sNpu39nPjxo3s2rWLwYMHF8PZC4URNZ+CIAiCIBS7/v37M2nSJL799ltuu+02vv/+e3RdZ+DAgQAsXLiQKVOmcPjwYcLDw2nYsCFWqzXffipXrlzocdLS0khJSaFJkyZ+0x0OBzabLd/24OBg+vTpw8KFC7nnnnuYP38+NWvW9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qeheYxDeqJJJf8z3BSUhK//fYbP/74I0lJSQBUrVoVgIULF3Lw4EHWrFnDXXfdhdvtxuVy5dtH/fr16dGjB0899RRLly5l//79zJgxg+nTpxMXF1ekcthsNoYPH84bb7zB0qVL2bdvH6+//jo7d+6kR48ePnkvtHxC+SJqPgVBEAShBCgJDeCWQfnn+QwPwTS
|
||
|
"text/plain": [
|
||
|
"<Figure size 709.625x500 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAI2CAYAAAAW++MuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3QU1dvA8e+UremBEEIIHUINvUkPIiBShFhAQEFR7PxUsGMviCKKr4qKigVUBARsKNgAAaUISAs19J6ezZaZef+ILCzZhADJpnA/53A0c+/O3Jmd3X3mVskwDANBEARBEARBCAC5tAsgCIIgCIIgXD5E8CkIgiAIgiAEjAg+BUEQBEEQhIARwacgCIIgCIIQMCL4FARBEARBEAJGBJ+CIAiCIAhCwIjgUxAEQRAEQQgYEXwKgiAIgiAIASOCT0EQBEEQBCFgRPApCIIgCIIgBIwIPgVBEARBEISAEcGnIAiCIAiCEDAi+BQEQRAEQRACRgSfgiAIgiAIQsCI4FMQBEEQhMuCYRilXQQBEXwKgiAIglCMRo0aRbt27XC5XAXmGThwINddd91F7f/AgQPEx8czb968C3rdO++8w4wZMy7qmELxEsGnIAiCIAjFJikpifT0dP744w+/6du2bWPbtm0kJSVd1P6rVKnCl19+Sffu3S/odVOnTsXhcFzUMYXiJYJPQRAEQRCKTa9evQgLC2PhwoV+07/55hvsdjv9+vW7qP2bzWZatGhBZGTkpRRTKEUi+BQEQRAEodiY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6jp6rbdu21KpVi8mTJ5OamsqgQYMu8YyFohDBpyAIgiAIJaJDhw5Ur16dJ598kqpVq9K5c2cAEhISAHj22WdZtWoVP/30E6NGjWLbtm0A5OTkFPkYt9xyC7quc8stt/D999+zcuVKnnzyST755BPq1KnjzRcaGsr69ev5+++/fZbZHDJkCH/99RcdO3YkJiamOE5bOA8RfAqCIAiCUCIkSWLw4MHs3buXwYMHe2sf27dvz8SJE1m/fj1jxozhpZdeolq1arz11lsAF9T0Hh0dzRdffEFsbCxPP/00Y8eOZePGjbzwwgvccsst3nxjx45l06ZNjBkzhsOHD3u3n14pSQw0ChzJODv8FwRBEARBuIy8//77fPDBByxbtqzQ/qFC8REDjgRBEARBuOzMnz+f5ORkZs2axe233y4CzwASwacgCIIgCJedbdu28cUXX3DllVcyZsyY0i7OZUU0uwuCIAiCIAgBIwYcCYIgCIIgCAEjgk9BEARBEAQhYETwKQiCIAiCIASMCD4FQRAEQRCEgBHBpyAIgiAIghAwIvgUBEEQBEEQAkYEn4IgCIIgCELAiOBTEARBECqYESNGMHDgwALTJ06cSGJiIoVN9T1v3jzi4+NLonh+rV69mvj4eA4cOBCwYwqlQwSfgiAIglCCDF1H27kPbd0WtJ37MHS9xI+ZlJTEtm3b2LFjR740l8vFjz/+yODBg5EkqcTLUlQtW7Zk+fLlxMTElHZRhBImltcUBEEQhBKibUzGPX8ppGee2RgWgunanigJDUrsuL179+a5555j0aJFPPDAAz5pS5cuJTMzkyFDhpTY8S+G2WwmKiqqtIshBICo+RQEQRCEEqBtTMb98Te+gSdAeibuj79B25hcYse2Wq1cc801fPvtt/ma1hcsWECnTp2QJImHHnqIK664giZNmtCtWzdef/119AJqZl0uF5MnT6ZLly60bNmS66+/nuXLl3vT582bR2JiIvPnz6dXr140bdqUIUOGsH79em8ej8fDtGnTSExMpHnz5gwePJg//vgDyN/sfuTIkQsqn1B+iOBTEARBEIqZoet5NZ6FcH+ztESb4JOSkjh48CBr1671bjt58iTLli3juuuu44477uDUqVPMmDGDH3/8kdtuu413332XX375xe/+Hn30UZYtW8bkyZOZP38+ffv2ZezYsfz222/ePMeOHeOLL75g8uTJfPnll8iyzMMPP+wNgF988UU+//xzHnroIRYtWkS3bt2466672LlzZ77jXWj5hPJDNLsLgiAIQjHTdx/IX+N5rrRM9N0HUOrVKJEyNG3alIYNG7Jo0SLatGkDwKJFiwgNDaVTp04cPHiQ3r17ExsbC+QNUnrvvffYvn07V155pc++UlJS+Pbbb/n6669p1qwZAKNGjWLbtm3MmDGD7t27A+B2u3n66adp1KgRkBdA3n333Rw/fhy73c5XX33FE088wdVXXw3A/fffj67rZGdn+xwvNzeXgQMHFrl8Qvkigk9BEARBKG4ZWcWb7yIlJSXx1ltv8cQTT2Aymfjmm28YNGgQwcHBDB8+nB9//JGZM2eSkpLCtm3bOHbsmN9m7S1btgAwcuRIn+1ut5vQ0FCfbXXr1vX+f0hIiDffnj17cLvdtGjRwif///73PyCv2f00q9V6QeUTyhcRfAqCIAhCcQsNLt58F6l///688sor/PHHH8TFxbF161Zee+01HA4HN910Ew6Hg759+zJw4ECefPJJbrrpJr/7Od1s/vnnnxMUFOSTJsu+PfjMZrPf15tMpiKX+0LLJ5QvIvgUBEEQhGIm16kOYSGFN72Hh+TlK0Hh4eH06tWLH3/8kapVq9KqVSvq1q3LTz/9xObNm1mxYgWVK1cGIC0tjZMnT/qd+7N+/fpAXp/O003sAK+//jqSJDFu3LjzlqVmzZqYTCY2bdpEw4YNvduTkpLo06ePtzkfYNmyZRdUPqF8EQOOBEEQBKGYSbKM6dqeheYxDeqJJJf8z3BSUhK//fYbP/74I0lJSQBUrVoVgIULF3Lw4EHWrFnDXXfdhdvtxuVy5dtH/fr16dGjB0899RRLly5l//79zJgxg+nTpxMXF1ekcthsNoYPH84bb7zB0qVL2bdvH6+//jo7d+6kR48ePnkvtHxC+SJqPgVBEAShBCgJDeCWQfnn+QwPwTS
|
||
|
"text/plain": [
|
||
|
"<Figure size 709.625x500 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import seaborn as sns\n",
|
||
|
"sns.set_theme()\n",
|
||
|
"sns.relplot(data=df, x=\"Size (cm)\", y=\"Weight (g)\", hue=\"Variety\")\n",
|
||
|
"sns.relplot(data=df, x=\"Size (cm)\", y=\"Weight (g)\", hue=\"Variety\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 21,
|
||
|
"id": "84984fe1-8a1d-43ec-9dff-44251cb03d76",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<seaborn.axisgrid.FacetGrid at 0x2ab180d9610>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 21,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAIgCAYAAADDdAKoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3gUVdvA4d+UbakkEHpoAUIw9K40gwgBEZCiIKCg2EVfFStifVUEQcVPRUXEgoIICrwICjaKoHSkhRrpECB9s7tTvj8igXU3IUCyKZz7urg0c2Znzsy2Z095jmSapokgCIIgCIIgBIBc0hUQBEEQBEEQrhwi+BQEQRAEQRACRgSfgiAIgiAIQsCI4FMQBEEQBEEIGBF8CoIgCIIgCAEjgk9BEARBEAQhYETwKQiCIAiCIASMCD4FQRAEQRCEgBHBpyAIgiAIghAwIvgUBEEQBEEQAkYEn4IgCIIgCELAiOBTEARBEARBCBgRfAqCIAiCIAgBI4JPQRAEQRAEIWBE8CkIgiAIwhXBNM2SroKACD4FQRAEQShCI0eOpG3btrjd7nz36du3L4MGDbqk4x86dIjY2FjmzZt3UY977733mD59+iWdUyhaIvgUBEEQBKHIDBw4kLS0NH777Te/5Tt37mTnzp0MHDjwko5fuXJlZs+eTdeuXS/qcW+++SZOp/OSzikULRF8CoIgCIJQZLp37054eDgLFizwW/7tt98SFBRE7969L+n4VquV5s2bExkZeTnVFEqQCD4FQRAEQSgyVquVPn368PPPP5ORkeFVpus6ixYtomfPnrjdbl544QWuvfZa4uPjadu2Lffffz+HDh3K23/48OE89thjjBkzhpYtW3LXXXf57XY/cuQIjzzyCG3btqVZs2bcdtttbN++Pa88NjYWgHfeeYfY2Fh2795NbGwss2fP9qrf8ePHiYuLY/78+cVxa4R/iOBTEARBEIQiNXDgQNxuN0uWLPHavnLlSk6ePMnAgQO5++67WbVqFY8++ijTp0/nvvvuY/Xq1YwfP97rMd9//z0Wi4X/+7//Y8SIET7nOn36NLfccgvbtm3j2Wef5Y033sAwDG699Vb27t0LkBdkDhw4kNmzZ9OgQQOaNWvGd99953Ws7777DrvdTo8ePYrydgj/opZ0BQRBEARBKF/i4uJo3LgxCxcu9JpYNH/+fGJiYqhZsyYOh4MnnniC1q1bA9CuXTsOHTrEV1995XUsWZZ56aWXCAoKAvBqGQWYOXMmqampfPnll9SoUQOAzp0706tXL9566y3efvttmjdvDkDVqlXz/n/AgAGMHz+egwcPEh0dDeQOCUhMTMw7l1A8RMunIAiCIAhFbuDAgfz5558cO3YMgIyMDH766ScGDhxIlSpV+PTTT2ndujVHjhzh999/5/PPP2fDhg14PB6v49SsWbPAYPD3338nLi6OKlWqoGkamqYhyzKdO3dm9erV+T6ud+/eOByOvNbPLVu2sHfvXm666aYiuHqhIKLlUxAEQRCEItenTx8mTJjAokWLuPPOO1m8eDGGYdC3b18AFixYwOTJkzl69CgVKlSgUaNG2O12n+NUqlSpwPOkpqaSnJzMVVdd5bfc6XTicDh8toeEhNCzZ08WLFjAAw88wPz586ldu3ZeS6xQfETwKQiCIAhCkQsLC6N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l16pTf3J9n0zWdOHEir4sdYMqUKUiSxMMPP3zButSuXRuLxcLWrVtp1KhR3vaBAwfSs2fPvO58gBUrVlxU/YSyRUw4EgRBEIQiJskylv7dCtzH0q9bsef7hNzg7pdffmHJkiUMHDgQgKpVqwKwYMECDh8+zLp167jvvvvweDy43W6fYzRo0IBrr72W5557juX
|
||
|
"text/plain": [
|
||
|
"<Figure size 709.625x500 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"dfv = df[df[\"Variety\"] != \"Cara Cara\"]\n",
|
||
|
"sns.relplot(data=dfv, x=\"Size (cm)\", y=\"Weight (g)\", hue=\"Variety\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 28,
|
||
|
"id": "c707980c-a2ff-4454-ad93-4ae3f7eb9495",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Variety\n",
|
||
|
"Star Ruby 16\n",
|
||
|
"Moro (Blood) 15\n",
|
||
|
"Cara Cara 15\n",
|
||
|
"Navel 14\n",
|
||
|
"Temple 14\n",
|
||
|
"Clementine 11\n",
|
||
|
"Washington Navel 11\n",
|
||
|
"Tangerine 11\n",
|
||
|
"Ortanique (Hybrid) 10\n",
|
||
|
"Ambiance 9\n",
|
||
|
"Satsuma Mandarin 9\n",
|
||
|
"Jaffa 8\n",
|
||
|
"Minneola (Hybrid) 8\n",
|
||
|
"California Valencia 7\n",
|
||
|
"Valencia 7\n",
|
||
|
"Honey Tangerine 6\n",
|
||
|
"Midsweet (Hybrid) 4\n",
|
||
|
"Navel (Late Season) 3\n",
|
||
|
"Hamlin 3\n",
|
||
|
"Murcott (Hybrid) 3\n",
|
||
|
"Clementine (Seedless) 3\n",
|
||
|
"Blood Orange 2\n",
|
||
|
"Navel (Early Season) 1\n",
|
||
|
"Tangelo (Hybrid) 1\n",
|
||
|
"Name: count, dtype: int64"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 28,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import sklearn\n",
|
||
|
"from sklearn.model_selection import train_test_split\n",
|
||
|
"df_train, df_test = sklearn.model_selection.train_test_split(df, test_size=50, random_state=1)\n",
|
||
|
"df_train[\"Variety\"].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 29,
|
||
|
"id": "03c5cfbe-26dd-4549-89e1-cecbb8629463",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Variety\n",
|
||
|
"Cara Cara 6\n",
|
||
|
"Minneola (Hybrid) 4\n",
|
||
|
"Satsuma Mandarin 4\n",
|
||
|
"Valencia 4\n",
|
||
|
"Temple 4\n",
|
||
|
"Tangerine 3\n",
|
||
|
"Ortanique (Hybrid) 3\n",
|
||
|
"Washington Navel 3\n",
|
||
|
"Clementine 3\n",
|
||
|
"Jaffa 3\n",
|
||
|
"Ambiance 2\n",
|
||
|
"Star Ruby 2\n",
|
||
|
"Hamlin 2\n",
|
||
|
"Navel 2\n",
|
||
|
"Navel (Early Season) 1\n",
|
||
|
"Clementine (Seedless) 1\n",
|
||
|
"Honey Tangerine 1\n",
|
||
|
"Moro (Blood) 1\n",
|
||
|
"Midsweet (Hybrid) 1\n",
|
||
|
"Name: count, dtype: int64"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 29,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df_test[\"Variety\"].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 36,
|
||
|
"id": "63bb94e9-1685-4441-ad3a-4b84537f329b",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Color\n",
|
||
|
"Deep Orange 67\n",
|
||
|
"Light Orange 58\n",
|
||
|
"Orange-Red 49\n",
|
||
|
"Orange 34\n",
|
||
|
"Yellow-Orange 8\n",
|
||
|
"Name: count, dtype: int64"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 36,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import sklearn\n",
|
||
|
"from sklearn.model_selection import train_test_split\n",
|
||
|
"df_train, df_test = train_test_split(df, test_size=0.1, random_state=1, stratify=df[\"Color\"])\n",
|
||
|
"df_train[\"Color\"].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 37,
|
||
|
"id": "a713b480-a260-4ecf-8021-ba42b60e059c",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Color\n",
|
||
|
"Deep Orange 8\n",
|
||
|
"Light Orange 6\n",
|
||
|
"Orange-Red 6\n",
|
||
|
"Orange 4\n",
|
||
|
"Yellow-Orange 1\n",
|
||
|
"Name: count, dtype: int64"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 37,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df_test[\"Color\"].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 38,
|
||
|
"id": "d9ed0c34-df90-4723-bf6b-9d0379d38b62",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(241, 11)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 38,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df = df.dropna()\n",
|
||
|
"df.shape"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 39,
|
||
|
"id": "241b2de1-b3e2-473f-905a-54a9f8beac37",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Size (cm) 0\n",
|
||
|
"Weight (g) 0\n",
|
||
|
"Brix (Sweetness) 0\n",
|
||
|
"pH (Acidity) 0\n",
|
||
|
"Softness (1-5) 0\n",
|
||
|
"HarvestTime (days) 0\n",
|
||
|
"Ripeness (1-5) 0\n",
|
||
|
"Color 0\n",
|
||
|
"Variety 0\n",
|
||
|
"Blemishes (Y/N) 0\n",
|
||
|
"Quality (1-5) 0\n",
|
||
|
"dtype: int64"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 39,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df.isna().sum()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 41,
|
||
|
"id": "f85b1df7-165b-4f48-96f6-7ea0461bf46f",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"from sklearn.preprocessing import MinMaxScaler\n",
|
||
|
"\n",
|
||
|
"numeric_columns = df.select_dtypes(include=['int', 'float']).columns\n",
|
||
|
"scaler = MinMaxScaler(feature_range=(0, 1))\n",
|
||
|
"\n",
|
||
|
"df_scaled = df.copy()\n",
|
||
|
"df_scaled[numeric_columns] = scaler.fit_transform(df[numeric_columns])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 42,
|
||
|
"id": "e6c850eb-97dd-44e1-a257-154b9fdb68ec",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div>\n",
|
||
|
"<style scoped>\n",
|
||
|
" .dataframe tbody tr th:only-of-type {\n",
|
||
|
" vertical-align: middle;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe tbody tr th {\n",
|
||
|
" vertical-align: top;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe thead th {\n",
|
||
|
" text-align: right;\n",
|
||
|
" }\n",
|
||
|
"</style>\n",
|
||
|
"<table border=\"1\" class=\"dataframe\">\n",
|
||
|
" <thead>\n",
|
||
|
" <tr style=\"text-align: right;\">\n",
|
||
|
" <th></th>\n",
|
||
|
" <th>Size (cm)</th>\n",
|
||
|
" <th>Weight (g)</th>\n",
|
||
|
" <th>Brix (Sweetness)</th>\n",
|
||
|
" <th>pH (Acidity)</th>\n",
|
||
|
" <th>Softness (1-5)</th>\n",
|
||
|
" <th>HarvestTime (days)</th>\n",
|
||
|
" <th>Ripeness (1-5)</th>\n",
|
||
|
" <th>Color</th>\n",
|
||
|
" <th>Variety</th>\n",
|
||
|
" <th>Blemishes (Y/N)</th>\n",
|
||
|
" <th>Quality (1-5)</th>\n",
|
||
|
" </tr>\n",
|
||
|
" </thead>\n",
|
||
|
" <tbody>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>0</th>\n",
|
||
|
" <td>0.375</td>\n",
|
||
|
" <td>0.40</td>\n",
|
||
|
" <td>0.619048</td>\n",
|
||
|
" <td>0.2500</td>\n",
|
||
|
" <td>0.250</td>\n",
|
||
|
" <td>0.285714</td>\n",
|
||
|
" <td>0.750</td>\n",
|
||
|
" <td>Orange</td>\n",
|
||
|
" <td>Valencia</td>\n",
|
||
|
" <td>N</td>\n",
|
||
|
" <td>0.750</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>1</th>\n",
|
||
|
" <td>0.550</td>\n",
|
||
|
" <td>0.60</td>\n",
|
||
|
" <td>0.476190</td>\n",
|
||
|
" <td>0.3750</td>\n",
|
||
|
" <td>0.500</td>\n",
|
||
|
" <td>0.476190</td>\n",
|
||
|
" <td>0.875</td>\n",
|
||
|
" <td>Deep Orange</td>\n",
|
||
|
" <td>Navel</td>\n",
|
||
|
" <td>N</td>\n",
|
||
|
" <td>0.875</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>2</th>\n",
|
||
|
" <td>0.200</td>\n",
|
||
|
" <td>0.25</td>\n",
|
||
|
" <td>0.809524</td>\n",
|
||
|
" <td>0.1250</td>\n",
|
||
|
" <td>0.000</td>\n",
|
||
|
" <td>0.142857</td>\n",
|
||
|
" <td>1.000</td>\n",
|
||
|
" <td>Light Orange</td>\n",
|
||
|
" <td>Cara Cara</td>\n",
|
||
|
" <td>N</td>\n",
|
||
|
" <td>1.000</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>3</th>\n",
|
||
|
" <td>0.750</td>\n",
|
||
|
" <td>0.75</td>\n",
|
||
|
" <td>0.285714</td>\n",
|
||
|
" <td>0.6250</td>\n",
|
||
|
" <td>0.750</td>\n",
|
||
|
" <td>0.809524</td>\n",
|
||
|
" <td>0.625</td>\n",
|
||
|
" <td>Orange-Red</td>\n",
|
||
|
" <td>Blood Orange</td>\n",
|
||
|
" <td>N</td>\n",
|
||
|
" <td>0.625</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>4</th>\n",
|
||
|
" <td>0.625</td>\n",
|
||
|
" <td>0.55</td>\n",
|
||
|
" <td>0.571429</td>\n",
|
||
|
" <td>0.3125</td>\n",
|
||
|
" <td>0.375</td>\n",
|
||
|
" <td>0.380952</td>\n",
|
||
|
" <td>1.000</td>\n",
|
||
|
" <td>Orange</td>\n",
|
||
|
" <td>Hamlin</td>\n",
|
||
|
" <td>Y (Minor)</td>\n",
|
||
|
" <td>0.875</td>\n",
|
||
|
" </tr>\n",
|
||
|
" </tbody>\n",
|
||
|
"</table>\n",
|
||
|
"</div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
" Size (cm) Weight (g) Brix (Sweetness) pH (Acidity) Softness (1-5) \\\n",
|
||
|
"0 0.375 0.40 0.619048 0.2500 0.250 \n",
|
||
|
"1 0.550 0.60 0.476190 0.3750 0.500 \n",
|
||
|
"2 0.200 0.25 0.809524 0.1250 0.000 \n",
|
||
|
"3 0.750 0.75 0.285714 0.6250 0.750 \n",
|
||
|
"4 0.625 0.55 0.571429 0.3125 0.375 \n",
|
||
|
"\n",
|
||
|
" HarvestTime (days) Ripeness (1-5) Color Variety \\\n",
|
||
|
"0 0.285714 0.750 Orange Valencia \n",
|
||
|
"1 0.476190 0.875 Deep Orange Navel \n",
|
||
|
"2 0.142857 1.000 Light Orange Cara Cara \n",
|
||
|
"3 0.809524 0.625 Orange-Red Blood Orange \n",
|
||
|
"4 0.380952 1.000 Orange Hamlin \n",
|
||
|
"\n",
|
||
|
" Blemishes (Y/N) Quality (1-5) \n",
|
||
|
"0 N 0.750 \n",
|
||
|
"1 N 0.875 \n",
|
||
|
"2 N 1.000 \n",
|
||
|
"3 N 0.625 \n",
|
||
|
"4 Y (Minor) 0.875 "
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 42,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df_scaled.head()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 44,
|
||
|
"id": "2daba6a5-6ff9-4c02-99cb-75aa437eaa3f",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Quality (1-5)\n",
|
||
|
"4.0 76\n",
|
||
|
"5.0 52\n",
|
||
|
"4.5 29\n",
|
||
|
"3.0 26\n",
|
||
|
"3.5 23\n",
|
||
|
"2.0 14\n",
|
||
|
"2.5 12\n",
|
||
|
"1.0 9\n",
|
||
|
"Name: count, dtype: int64"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 44,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df['Quality (1-5)'].value_counts().head(10)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 45,
|
||
|
"id": "bd75c6b7-8faf-4a94-af2c-d34161476aa8",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Ripeness (1-5)\n",
|
||
|
"5.0 58\n",
|
||
|
"4.0 52\n",
|
||
|
"3.0 46\n",
|
||
|
"2.0 27\n",
|
||
|
"4.5 23\n",
|
||
|
"1.0 17\n",
|
||
|
"3.5 12\n",
|
||
|
"2.5 6\n",
|
||
|
"Name: count, dtype: int64"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 45,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df['Ripeness (1-5)'].value_counts().head(10)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 46,
|
||
|
"id": "243cfbf0-a108-4459-8bd8-a070fbfa368d",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"HarvestTime (days)\n",
|
||
|
"11 23\n",
|
||
|
"15 16\n",
|
||
|
"12 16\n",
|
||
|
"10 15\n",
|
||
|
"22 14\n",
|
||
|
"20 14\n",
|
||
|
"16 13\n",
|
||
|
"17 13\n",
|
||
|
"14 13\n",
|
||
|
"13 13\n",
|
||
|
"Name: count, dtype: int64"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 46,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df['HarvestTime (days)'].value_counts().head(10)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 47,
|
||
|
"id": "a3f0bb30-9f2f-4c47-a5f4-850e91b870c0",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"HarvestTime (days)\n",
|
||
|
"11 23\n",
|
||
|
"15 16\n",
|
||
|
"12 16\n",
|
||
|
"10 15\n",
|
||
|
"22 14\n",
|
||
|
"20 14\n",
|
||
|
"16 13\n",
|
||
|
"17 13\n",
|
||
|
"14 13\n",
|
||
|
"13 13\n",
|
||
|
"18 12\n",
|
||
|
"23 12\n",
|
||
|
"21 12\n",
|
||
|
"19 12\n",
|
||
|
"25 7\n",
|
||
|
"24 6\n",
|
||
|
"5 6\n",
|
||
|
"9 6\n",
|
||
|
"7 6\n",
|
||
|
"8 5\n",
|
||
|
"6 5\n",
|
||
|
"4 2\n",
|
||
|
"Name: count, dtype: int64"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 47,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df['HarvestTime (days)'].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "0996b978-3471-4d87-9319-8956fc96311a",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3 (ipykernel)",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.11.7"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 5
|
||
|
}
|