{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "f7fcc870-b5eb-45c4-8d40-7d7e96e6dede",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:09:50.486944Z",
     "iopub.status.busy": "2025-11-25T08:09:50.486778Z",
     "iopub.status.idle": "2025-11-25T08:09:51.034215Z",
     "shell.execute_reply": "2025-11-25T08:09:51.033537Z",
     "shell.execute_reply.started": "2025-11-25T08:09:50.486924Z"
    }
   },
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "5468fd9c-7cb2-448f-9557-ad7e8f67e402",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:10:33.571112Z",
     "iopub.status.busy": "2025-11-25T08:10:33.570874Z",
     "iopub.status.idle": "2025-11-25T08:10:33.604195Z",
     "shell.execute_reply": "2025-11-25T08:10:33.603676Z",
     "shell.execute_reply.started": "2025-11-25T08:10:33.571096Z"
    }
   },
   "outputs": [],
   "source": [
    "daten = pd.read_csv('https://data.hsbo.de/Bestellungen_Shop.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "301a2c1d-7c09-4e39-b6ba-87dd498f1493",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:10:33.991233Z",
     "iopub.status.busy": "2025-11-25T08:10:33.990978Z",
     "iopub.status.idle": "2025-11-25T08:10:33.999975Z",
     "shell.execute_reply": "2025-11-25T08:10:33.999453Z",
     "shell.execute_reply.started": "2025-11-25T08:10:33.991213Z"
    }
   },
   "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>Unnamed: 0</th>\n",
       "      <th>Datum</th>\n",
       "      <th>BestellungNr</th>\n",
       "      <th>Kundengruppe</th>\n",
       "      <th>Altersgruppe</th>\n",
       "      <th>Artikel</th>\n",
       "      <th>Betrag</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>2024-06-10</td>\n",
       "      <td>211</td>\n",
       "      <td>KigaKind</td>\n",
       "      <td>0-5</td>\n",
       "      <td>1</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>2024-06-10</td>\n",
       "      <td>215</td>\n",
       "      <td>Mitarbeiter</td>\n",
       "      <td>31-40</td>\n",
       "      <td>1</td>\n",
       "      <td>0.10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>2024-06-10</td>\n",
       "      <td>219</td>\n",
       "      <td>Schulkind</td>\n",
       "      <td>6-10</td>\n",
       "      <td>1</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>2024-06-10</td>\n",
       "      <td>222</td>\n",
       "      <td>KigaKind</td>\n",
       "      <td>0-5</td>\n",
       "      <td>3</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>2024-06-11</td>\n",
       "      <td>229</td>\n",
       "      <td>Mitarbeiter</td>\n",
       "      <td>41-50</td>\n",
       "      <td>1</td>\n",
       "      <td>0.05</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Unnamed: 0       Datum  BestellungNr Kundengruppe Altersgruppe  Artikel  \\\n",
       "0           0  2024-06-10           211     KigaKind          0-5        1   \n",
       "1           1  2024-06-10           215  Mitarbeiter        31-40        1   \n",
       "2           2  2024-06-10           219    Schulkind         6-10        1   \n",
       "3           3  2024-06-10           222     KigaKind          0-5        3   \n",
       "4           4  2024-06-11           229  Mitarbeiter        41-50        1   \n",
       "\n",
       "   Betrag  \n",
       "0    0.15  \n",
       "1    0.10  \n",
       "2    0.15  \n",
       "3    0.15  \n",
       "4    0.05  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "daten.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "10d8e037-7510-43b5-af38-283c50bf3dd1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:11:54.540549Z",
     "iopub.status.busy": "2025-11-25T08:11:54.540309Z",
     "iopub.status.idle": "2025-11-25T08:11:54.545168Z",
     "shell.execute_reply": "2025-11-25T08:11:54.544639Z",
     "shell.execute_reply.started": "2025-11-25T08:11:54.540533Z"
    }
   },
   "outputs": [],
   "source": [
    "df = daten.loc[:, ['Kundengruppe','Betrag']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "4405c95e-9af4-4cf3-8048-d025b985df04",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:12:50.638663Z",
     "iopub.status.busy": "2025-11-25T08:12:50.638343Z",
     "iopub.status.idle": "2025-11-25T08:12:50.642814Z",
     "shell.execute_reply": "2025-11-25T08:12:50.642205Z",
     "shell.execute_reply.started": "2025-11-25T08:12:50.638643Z"
    }
   },
   "outputs": [],
   "source": [
    "kigaKinder = df[df['Kundengruppe'] == 'KigaKind']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "7904cc26-87b7-445c-a7f1-4ad5c2fad92d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:13:12.890226Z",
     "iopub.status.busy": "2025-11-25T08:13:12.889917Z",
     "iopub.status.idle": "2025-11-25T08:13:12.895326Z",
     "shell.execute_reply": "2025-11-25T08:13:12.894550Z",
     "shell.execute_reply.started": "2025-11-25T08:13:12.890204Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "np.float64(1.1500000000000001)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kigaKinder['Betrag'].sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "eff05837-674b-4473-904b-9168e70ec84f",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:13:30.308814Z",
     "iopub.status.busy": "2025-11-25T08:13:30.308474Z",
     "iopub.status.idle": "2025-11-25T08:13:30.317346Z",
     "shell.execute_reply": "2025-11-25T08:13:30.316571Z",
     "shell.execute_reply.started": "2025-11-25T08:13:30.308791Z"
    }
   },
   "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>Kundengruppe</th>\n",
       "      <th>Betrag</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>KigaKind</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Mitarbeiter</td>\n",
       "      <td>0.10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Schulkind</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>KigaKind</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Mitarbeiter</td>\n",
       "      <td>0.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>Mitarbeiter</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>Schulkind</td>\n",
       "      <td>0.10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>Schulkind</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>Schulkind</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>Mitarbeiter</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>102 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Kundengruppe  Betrag\n",
       "0       KigaKind    0.15\n",
       "1    Mitarbeiter    0.10\n",
       "2      Schulkind    0.15\n",
       "3       KigaKind    0.15\n",
       "4    Mitarbeiter    0.05\n",
       "..           ...     ...\n",
       "97   Mitarbeiter    0.15\n",
       "98     Schulkind    0.10\n",
       "99     Schulkind    0.15\n",
       "100    Schulkind    0.15\n",
       "101  Mitarbeiter    0.15\n",
       "\n",
       "[102 rows x 2 columns]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "5ade3e2e-f7eb-41a8-8831-fe629186e201",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:14:08.934929Z",
     "iopub.status.busy": "2025-11-25T08:14:08.934706Z",
     "iopub.status.idle": "2025-11-25T08:14:08.947517Z",
     "shell.execute_reply": "2025-11-25T08:14:08.946911Z",
     "shell.execute_reply.started": "2025-11-25T08:14:08.934912Z"
    }
   },
   "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>Betrag</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Kundengruppe</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Gast</th>\n",
       "      <td>1.10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>KigaKind</th>\n",
       "      <td>1.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mitarbeiter</th>\n",
       "      <td>2.30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Schulkind</th>\n",
       "      <td>6.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Student</th>\n",
       "      <td>0.80</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              Betrag\n",
       "Kundengruppe        \n",
       "Gast            1.10\n",
       "KigaKind        1.15\n",
       "Mitarbeiter     2.30\n",
       "Schulkind       6.05\n",
       "Student         0.80"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby('Kundengruppe').sum()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2c0c5ccd-aacb-40a9-a749-0671c0d8898d",
   "metadata": {},
   "source": [
    "# Kuchenbeispiel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "573e7059-d86d-421b-b6a4-39616b63284f",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:28:41.401038Z",
     "iopub.status.busy": "2025-11-25T08:28:41.400707Z",
     "iopub.status.idle": "2025-11-25T08:28:41.499889Z",
     "shell.execute_reply": "2025-11-25T08:28:41.499364Z",
     "shell.execute_reply.started": "2025-11-25T08:28:41.401014Z"
    }
   },
   "outputs": [],
   "source": [
    "kuchen = pd.read_csv('https://data.hsbo.de/kuchen.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "401d1385-dfa5-49df-8c85-eb1c5b0624d8",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:28:44.187686Z",
     "iopub.status.busy": "2025-11-25T08:28:44.187384Z",
     "iopub.status.idle": "2025-11-25T08:28:44.195127Z",
     "shell.execute_reply": "2025-11-25T08:28:44.194649Z",
     "shell.execute_reply.started": "2025-11-25T08:28:44.187663Z"
    }
   },
   "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>Datum</th>\n",
       "      <th>BonNr</th>\n",
       "      <th>Apfelkuchen</th>\n",
       "      <th>Kirschkuchen</th>\n",
       "      <th>Sacher</th>\n",
       "      <th>Zitronenkuchen</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>77</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>78</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>79</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>80</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>81</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        Datum  BonNr  Apfelkuchen  Kirschkuchen  Sacher  Zitronenkuchen\n",
       "0  2023-10-12     77            0             0       0               0\n",
       "1  2023-10-12     78            0             0       0               0\n",
       "2  2023-10-12     79            1             0       0               0\n",
       "3  2023-10-12     80            0             0       0               0\n",
       "4  2023-10-12     81            0             0       0               0"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kuchen.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "02125fd5-3fc0-4165-8b6a-6db9c2987fa5",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:30:09.910682Z",
     "iopub.status.busy": "2025-11-25T08:30:09.910346Z",
     "iopub.status.idle": "2025-11-25T08:30:09.915753Z",
     "shell.execute_reply": "2025-11-25T08:30:09.915320Z",
     "shell.execute_reply.started": "2025-11-25T08:30:09.910657Z"
    }
   },
   "outputs": [],
   "source": [
    "kuchen['Datum'] = pd.to_datetime(kuchen['Datum'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "cc04391c-4934-4aa7-9a42-d8549f0938db",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:30:13.431780Z",
     "iopub.status.busy": "2025-11-25T08:30:13.431475Z",
     "iopub.status.idle": "2025-11-25T08:30:13.440460Z",
     "shell.execute_reply": "2025-11-25T08:30:13.439879Z",
     "shell.execute_reply.started": "2025-11-25T08:30:13.431757Z"
    }
   },
   "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>Datum</th>\n",
       "      <th>BonNr</th>\n",
       "      <th>Apfelkuchen</th>\n",
       "      <th>Kirschkuchen</th>\n",
       "      <th>Sacher</th>\n",
       "      <th>Zitronenkuchen</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>77</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>78</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>79</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>80</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>81</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Datum  BonNr  Apfelkuchen  Kirschkuchen  Sacher  Zitronenkuchen\n",
       "0 2023-10-12     77            0             0       0               0\n",
       "1 2023-10-12     78            0             0       0               0\n",
       "2 2023-10-12     79            1             0       0               0\n",
       "3 2023-10-12     80            0             0       0               0\n",
       "4 2023-10-12     81            0             0       0               0"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kuchen.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "891a9096-4d33-476c-bbb2-b9a29f30f2d0",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:31:11.787929Z",
     "iopub.status.busy": "2025-11-25T08:31:11.787596Z",
     "iopub.status.idle": "2025-11-25T08:31:11.793262Z",
     "shell.execute_reply": "2025-11-25T08:31:11.792356Z",
     "shell.execute_reply.started": "2025-11-25T08:31:11.787907Z"
    }
   },
   "outputs": [],
   "source": [
    "kuchen['Wochentag'] = kuchen['Datum'].dt.day_name()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "f82bdd1d-ab8a-4aea-ad40-1e91136b9c8b",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:31:26.100389Z",
     "iopub.status.busy": "2025-11-25T08:31:26.100089Z",
     "iopub.status.idle": "2025-11-25T08:31:26.108675Z",
     "shell.execute_reply": "2025-11-25T08:31:26.108017Z",
     "shell.execute_reply.started": "2025-11-25T08:31:26.100364Z"
    }
   },
   "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>Datum</th>\n",
       "      <th>BonNr</th>\n",
       "      <th>Apfelkuchen</th>\n",
       "      <th>Kirschkuchen</th>\n",
       "      <th>Sacher</th>\n",
       "      <th>Zitronenkuchen</th>\n",
       "      <th>Wochentag</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>77</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Thursday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>78</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Thursday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>79</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Thursday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>80</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Thursday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2023-10-12</td>\n",
       "      <td>81</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Thursday</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Datum  BonNr  Apfelkuchen  Kirschkuchen  Sacher  Zitronenkuchen  \\\n",
       "0 2023-10-12     77            0             0       0               0   \n",
       "1 2023-10-12     78            0             0       0               0   \n",
       "2 2023-10-12     79            1             0       0               0   \n",
       "3 2023-10-12     80            0             0       0               0   \n",
       "4 2023-10-12     81            0             0       0               0   \n",
       "\n",
       "  Wochentag  \n",
       "0  Thursday  \n",
       "1  Thursday  \n",
       "2  Thursday  \n",
       "3  Thursday  \n",
       "4  Thursday  "
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kuchen.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "4ffd0dd6-639d-4f04-b2aa-9f3568d72613",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:34:35.528105Z",
     "iopub.status.busy": "2025-11-25T08:34:35.527806Z",
     "iopub.status.idle": "2025-11-25T08:34:35.532706Z",
     "shell.execute_reply": "2025-11-25T08:34:35.532003Z",
     "shell.execute_reply.started": "2025-11-25T08:34:35.528082Z"
    }
   },
   "outputs": [],
   "source": [
    "kuchenWochentag = kuchen.loc[:, 'Apfelkuchen':'Wochentag']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "34b87f17-a3c1-4a29-93fe-fe8076242976",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:34:38.862560Z",
     "iopub.status.busy": "2025-11-25T08:34:38.862187Z",
     "iopub.status.idle": "2025-11-25T08:34:38.870586Z",
     "shell.execute_reply": "2025-11-25T08:34:38.869787Z",
     "shell.execute_reply.started": "2025-11-25T08:34:38.862537Z"
    }
   },
   "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>Apfelkuchen</th>\n",
       "      <th>Kirschkuchen</th>\n",
       "      <th>Sacher</th>\n",
       "      <th>Zitronenkuchen</th>\n",
       "      <th>Wochentag</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Thursday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Thursday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Thursday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Thursday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Thursday</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Apfelkuchen  Kirschkuchen  Sacher  Zitronenkuchen Wochentag\n",
       "0            0             0       0               0  Thursday\n",
       "1            0             0       0               0  Thursday\n",
       "2            1             0       0               0  Thursday\n",
       "3            0             0       0               0  Thursday\n",
       "4            0             0       0               0  Thursday"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kuchenWochentag.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "964bf035-e1b3-4e71-a59b-f256f61532c4",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:36:54.367073Z",
     "iopub.status.busy": "2025-11-25T08:36:54.366761Z",
     "iopub.status.idle": "2025-11-25T08:36:54.371981Z",
     "shell.execute_reply": "2025-11-25T08:36:54.371160Z",
     "shell.execute_reply.started": "2025-11-25T08:36:54.367052Z"
    }
   },
   "outputs": [],
   "source": [
    "kuchenProWochentag = kuchenWochentag.groupby('Wochentag').sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "40d4973b-45ef-45b3-be6f-4fee6481c382",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-25T08:51:39.553264Z",
     "iopub.status.busy": "2025-11-25T08:51:39.552763Z",
     "iopub.status.idle": "2025-11-25T08:51:39.562527Z",
     "shell.execute_reply": "2025-11-25T08:51:39.562016Z",
     "shell.execute_reply.started": "2025-11-25T08:51:39.553229Z"
    }
   },
   "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>Apfelkuchen</th>\n",
       "      <th>Kirschkuchen</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Apfelkuchen</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.611861</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Kirschkuchen</th>\n",
       "      <td>0.611861</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              Apfelkuchen  Kirschkuchen\n",
       "Apfelkuchen      1.000000      0.611861\n",
       "Kirschkuchen     0.611861      1.000000"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kuchenProWochentag[['Apfelkuchen', 'Kirschkuchen']].corr()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "cd3c3c85-217b-4398-b0e9-c5323f453b06",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d4ded142-3de8-45bb-8a04-8e11f378e753",
   "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.12.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
