1036 lines
27 KiB
Plaintext
1036 lines
27 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import pandas as pd"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"operations = pd.read_csv(\"./00020510001.csv\")"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 11,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"operations[\"Date\"] = pd.to_datetime(operations[\"Date\"])\n",
|
|
"operations[\"Date de valeur\"] = pd.to_datetime(operations[\"Date de valeur\"])"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 129,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"postes = {\n",
|
|
" \"autoroute\": [\"AUTOROUTE\", \"APRR\"],\n",
|
|
" \"essence\": [\"CARBU\", \"TOTAL\", \"ESSFLO\", \"STATION\", \"AVIA\", ],\n",
|
|
" \"bouffe\": [\"BIOCOOP\", \"LA VIE CLAIRE\", \"MAISON VITALE\", \"BOUCHERIE\", \"SALAISON CHALAM\", \"INTERMARCHE\", \"LA FERME DU COIN\",],\n",
|
|
" \"bio\": [\"BIOCOOP\", \"LA VIE CLAIRE\", \"MAISON VITALE\"],\n",
|
|
"}"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 103,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def select_mots(df, colname, mots, inverse=False):\n",
|
|
" if inverse:\n",
|
|
" return df[~df[colname].str.contains('|'.join(mots))]\n",
|
|
" return df[df[colname].str.contains('|'.join(mots))]"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Mois d'octobre\n",
|
|
"\n",
|
|
"On est parti en Corse espéront que ça explique tout..."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 107,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"oct_op = operations[(operations[\"Date\"] >= \"2018-10\") & (operations[\"Date\"] < \"2018-11\")]"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Total des dépenses"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 108,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-1919.1499999999999"
|
|
]
|
|
},
|
|
"execution_count": 108,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"oct_depenses = oct_op[oct_op[\"Montant\"]<0]\n",
|
|
"oct_depenses[\"Montant\"].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Retraits"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 109,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-360.0"
|
|
]
|
|
},
|
|
"execution_count": 109,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"select_mots(oct_depenses, \"Libellé\", [\"RETRAIT\"])[\"Montant\"].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Paiement par carte"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 110,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-1426.02"
|
|
]
|
|
},
|
|
"execution_count": 110,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"select_mots(oct_depenses, \"Libellé\", [\"PAIEMENT\"])[\"Montant\"].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Dont autoroute"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 111,
|
|
"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>Date</th>\n",
|
|
" <th>Date de valeur</th>\n",
|
|
" <th>Montant</th>\n",
|
|
" <th>Libellé</th>\n",
|
|
" <th>Solde</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>18</th>\n",
|
|
" <td>2018-10-12</td>\n",
|
|
" <td>2018-10-12</td>\n",
|
|
" <td>-10.6</td>\n",
|
|
" <td>PAIEMENT CB 1110 21850 ST APOL APRR CARTE 7414...</td>\n",
|
|
" <td>221.64</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>21</th>\n",
|
|
" <td>2018-10-15</td>\n",
|
|
" <td>2018-10-15</td>\n",
|
|
" <td>-13.8</td>\n",
|
|
" <td>PAIEMENT CB 1410 BERSAILLIN APRR CARTE 36045419</td>\n",
|
|
" <td>133.29</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>25</th>\n",
|
|
" <td>2018-10-15</td>\n",
|
|
" <td>2018-10-15</td>\n",
|
|
" <td>-2.8</td>\n",
|
|
" <td>PAIEMENT CB 1410 PARIS RHIN RH APRR CARTE 3604...</td>\n",
|
|
" <td>-80.05</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>43</th>\n",
|
|
" <td>2018-10-22</td>\n",
|
|
" <td>2018-10-22</td>\n",
|
|
" <td>-9.0</td>\n",
|
|
" <td>PAIEMENT CB 1910 21850 APRR CARTE 36045419</td>\n",
|
|
" <td>751.36</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>44</th>\n",
|
|
" <td>2018-10-22</td>\n",
|
|
" <td>2018-10-22</td>\n",
|
|
" <td>-23.8</td>\n",
|
|
" <td>PAIEMENT CB 2110 VEDENE AUTOROUTE DU SUD CARTE...</td>\n",
|
|
" <td>727.56</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>65</th>\n",
|
|
" <td>2018-10-31</td>\n",
|
|
" <td>2018-10-31</td>\n",
|
|
" <td>-17.2</td>\n",
|
|
" <td>PAIEMENT CB 2910 VEDENE AUTOROUTE DU SUD CARTE...</td>\n",
|
|
" <td>353.13</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" Date Date de valeur Montant \\\n",
|
|
"18 2018-10-12 2018-10-12 -10.6 \n",
|
|
"21 2018-10-15 2018-10-15 -13.8 \n",
|
|
"25 2018-10-15 2018-10-15 -2.8 \n",
|
|
"43 2018-10-22 2018-10-22 -9.0 \n",
|
|
"44 2018-10-22 2018-10-22 -23.8 \n",
|
|
"65 2018-10-31 2018-10-31 -17.2 \n",
|
|
"\n",
|
|
" Libellé Solde \n",
|
|
"18 PAIEMENT CB 1110 21850 ST APOL APRR CARTE 7414... 221.64 \n",
|
|
"21 PAIEMENT CB 1410 BERSAILLIN APRR CARTE 36045419 133.29 \n",
|
|
"25 PAIEMENT CB 1410 PARIS RHIN RH APRR CARTE 3604... -80.05 \n",
|
|
"43 PAIEMENT CB 1910 21850 APRR CARTE 36045419 751.36 \n",
|
|
"44 PAIEMENT CB 2110 VEDENE AUTOROUTE DU SUD CARTE... 727.56 \n",
|
|
"65 PAIEMENT CB 2910 VEDENE AUTOROUTE DU SUD CARTE... 353.13 "
|
|
]
|
|
},
|
|
"execution_count": 111,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"select_mots(oct_depenses, \"Libellé\", postes[\"autoroute\"])"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 112,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-77.2"
|
|
]
|
|
},
|
|
"execution_count": 112,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"_[\"Montant\"].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Dont essence"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 130,
|
|
"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>Date</th>\n",
|
|
" <th>Date de valeur</th>\n",
|
|
" <th>Montant</th>\n",
|
|
" <th>Libellé</th>\n",
|
|
" <th>Solde</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>11</th>\n",
|
|
" <td>2018-10-08</td>\n",
|
|
" <td>2018-10-08</td>\n",
|
|
" <td>-56.54</td>\n",
|
|
" <td>PAIEMENT CB 0610 EPAGNY AUCHAN CARBURANT CARTE...</td>\n",
|
|
" <td>502.95</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>17</th>\n",
|
|
" <td>2018-10-12</td>\n",
|
|
" <td>2018-10-12</td>\n",
|
|
" <td>-89.62</td>\n",
|
|
" <td>PAIEMENT CB 1110 ARBENT ESSFLOREALYG341 CARTE ...</td>\n",
|
|
" <td>232.24</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>32</th>\n",
|
|
" <td>2018-10-18</td>\n",
|
|
" <td>2018-10-18</td>\n",
|
|
" <td>-47.28</td>\n",
|
|
" <td>PAIEMENT CB 1710 ST CLAUDE STATION TOTAL CARTE...</td>\n",
|
|
" <td>406.01</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>37</th>\n",
|
|
" <td>2018-10-22</td>\n",
|
|
" <td>2018-10-22</td>\n",
|
|
" <td>-96.43</td>\n",
|
|
" <td>PAIEMENT CB 1910 ARBENT ESSFLOREALYG341 CARTE ...</td>\n",
|
|
" <td>866.38</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" Date Date de valeur Montant \\\n",
|
|
"11 2018-10-08 2018-10-08 -56.54 \n",
|
|
"17 2018-10-12 2018-10-12 -89.62 \n",
|
|
"32 2018-10-18 2018-10-18 -47.28 \n",
|
|
"37 2018-10-22 2018-10-22 -96.43 \n",
|
|
"\n",
|
|
" Libellé Solde \n",
|
|
"11 PAIEMENT CB 0610 EPAGNY AUCHAN CARBURANT CARTE... 502.95 \n",
|
|
"17 PAIEMENT CB 1110 ARBENT ESSFLOREALYG341 CARTE ... 232.24 \n",
|
|
"32 PAIEMENT CB 1710 ST CLAUDE STATION TOTAL CARTE... 406.01 \n",
|
|
"37 PAIEMENT CB 1910 ARBENT ESSFLOREALYG341 CARTE ... 866.38 "
|
|
]
|
|
},
|
|
"execution_count": 130,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"select_mots(oct_depenses, \"Libellé\", postes[\"essence\"])"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 114,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-289.87"
|
|
]
|
|
},
|
|
"execution_count": 114,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"_[\"Montant\"].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Le bio"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 125,
|
|
"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>Date</th>\n",
|
|
" <th>Date de valeur</th>\n",
|
|
" <th>Montant</th>\n",
|
|
" <th>Libellé</th>\n",
|
|
" <th>Solde</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>2018-10-01</td>\n",
|
|
" <td>2018-10-01</td>\n",
|
|
" <td>-10.04</td>\n",
|
|
" <td>PAIEMENT CB 2809 ST CLAUDE LA VIE CLAIRE CARTE...</td>\n",
|
|
" <td>362.24</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>22</th>\n",
|
|
" <td>2018-10-15</td>\n",
|
|
" <td>2018-10-15</td>\n",
|
|
" <td>-74.25</td>\n",
|
|
" <td>PAIEMENT CB 1210 DORLISHEIM LA MAISON VITALE C...</td>\n",
|
|
" <td>59.04</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" Date Date de valeur Montant \\\n",
|
|
"5 2018-10-01 2018-10-01 -10.04 \n",
|
|
"22 2018-10-15 2018-10-15 -74.25 \n",
|
|
"\n",
|
|
" Libellé Solde \n",
|
|
"5 PAIEMENT CB 2809 ST CLAUDE LA VIE CLAIRE CARTE... 362.24 \n",
|
|
"22 PAIEMENT CB 1210 DORLISHEIM LA MAISON VITALE C... 59.04 "
|
|
]
|
|
},
|
|
"execution_count": 125,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"select_mots(oct_depenses, \"Libellé\", postes[\"bio\"])"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 126,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-84.28999999999999"
|
|
]
|
|
},
|
|
"execution_count": 126,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"_[\"Montant\"].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Les courses courantes"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 127,
|
|
"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>Date</th>\n",
|
|
" <th>Date de valeur</th>\n",
|
|
" <th>Montant</th>\n",
|
|
" <th>Libellé</th>\n",
|
|
" <th>Solde</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>2018-10-01</td>\n",
|
|
" <td>2018-10-01</td>\n",
|
|
" <td>-10.04</td>\n",
|
|
" <td>PAIEMENT CB 2809 ST CLAUDE LA VIE CLAIRE CARTE...</td>\n",
|
|
" <td>362.24</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>2018-10-01</td>\n",
|
|
" <td>2018-10-01</td>\n",
|
|
" <td>-39.65</td>\n",
|
|
" <td>PAIEMENT CB 2809 LA PESSE BOUCHERIE GRENA CART...</td>\n",
|
|
" <td>322.59</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>12</th>\n",
|
|
" <td>2018-10-08</td>\n",
|
|
" <td>2018-10-08</td>\n",
|
|
" <td>-6.90</td>\n",
|
|
" <td>PAIEMENT CB 0510 LA PESSE SALAISON CHALAM CART...</td>\n",
|
|
" <td>496.05</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>16</th>\n",
|
|
" <td>2018-10-11</td>\n",
|
|
" <td>2018-10-11</td>\n",
|
|
" <td>-11.69</td>\n",
|
|
" <td>PAIEMENT CB 0910 LA PESSE BOUCHERIE GRENA CART...</td>\n",
|
|
" <td>321.86</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>22</th>\n",
|
|
" <td>2018-10-15</td>\n",
|
|
" <td>2018-10-15</td>\n",
|
|
" <td>-74.25</td>\n",
|
|
" <td>PAIEMENT CB 1210 DORLISHEIM LA MAISON VITALE C...</td>\n",
|
|
" <td>59.04</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>31</th>\n",
|
|
" <td>2018-10-18</td>\n",
|
|
" <td>2018-10-18</td>\n",
|
|
" <td>-23.06</td>\n",
|
|
" <td>PAIEMENT CB 1710 ST CLAUDE CED INTERMARCHE CAR...</td>\n",
|
|
" <td>453.29</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>40</th>\n",
|
|
" <td>2018-10-22</td>\n",
|
|
" <td>2018-10-22</td>\n",
|
|
" <td>-24.72</td>\n",
|
|
" <td>PAIEMENT CB 1910 CHATUZANGE LE LA FERME DU COI...</td>\n",
|
|
" <td>833.06</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" Date Date de valeur Montant \\\n",
|
|
"5 2018-10-01 2018-10-01 -10.04 \n",
|
|
"6 2018-10-01 2018-10-01 -39.65 \n",
|
|
"12 2018-10-08 2018-10-08 -6.90 \n",
|
|
"16 2018-10-11 2018-10-11 -11.69 \n",
|
|
"22 2018-10-15 2018-10-15 -74.25 \n",
|
|
"31 2018-10-18 2018-10-18 -23.06 \n",
|
|
"40 2018-10-22 2018-10-22 -24.72 \n",
|
|
"\n",
|
|
" Libellé Solde \n",
|
|
"5 PAIEMENT CB 2809 ST CLAUDE LA VIE CLAIRE CARTE... 362.24 \n",
|
|
"6 PAIEMENT CB 2809 LA PESSE BOUCHERIE GRENA CART... 322.59 \n",
|
|
"12 PAIEMENT CB 0510 LA PESSE SALAISON CHALAM CART... 496.05 \n",
|
|
"16 PAIEMENT CB 0910 LA PESSE BOUCHERIE GRENA CART... 321.86 \n",
|
|
"22 PAIEMENT CB 1210 DORLISHEIM LA MAISON VITALE C... 59.04 \n",
|
|
"31 PAIEMENT CB 1710 ST CLAUDE CED INTERMARCHE CAR... 453.29 \n",
|
|
"40 PAIEMENT CB 1910 CHATUZANGE LE LA FERME DU COI... 833.06 "
|
|
]
|
|
},
|
|
"execution_count": 127,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"select_mots(oct_depenses, \"Libellé\", postes[\"bouffe\"])"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 128,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-190.31"
|
|
]
|
|
},
|
|
"execution_count": 128,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"_[\"Montant\"].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Autres que les paiements et retraits"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 115,
|
|
"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>Date</th>\n",
|
|
" <th>Date de valeur</th>\n",
|
|
" <th>Montant</th>\n",
|
|
" <th>Libellé</th>\n",
|
|
" <th>Solde</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>2018-10-02</td>\n",
|
|
" <td>2018-10-02</td>\n",
|
|
" <td>-23.10</td>\n",
|
|
" <td>HABITAT BQ6459900 1827599 BQ6459900</td>\n",
|
|
" <td>299.49</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>2018-10-05</td>\n",
|
|
" <td>2018-10-01</td>\n",
|
|
" <td>-6.25</td>\n",
|
|
" <td>F FRAIS BANCAIRES MENSUALISES</td>\n",
|
|
" <td>593.24</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>26</th>\n",
|
|
" <td>2018-10-15</td>\n",
|
|
" <td>2018-11-14</td>\n",
|
|
" <td>-16.00</td>\n",
|
|
" <td>F COMM INTERVENTION 6 OPER</td>\n",
|
|
" <td>-96.05</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>29</th>\n",
|
|
" <td>2018-10-17</td>\n",
|
|
" <td>2018-10-17</td>\n",
|
|
" <td>-22.00</td>\n",
|
|
" <td>VIR SEPA JULIE AVELLANA</td>\n",
|
|
" <td>176.35</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>58</th>\n",
|
|
" <td>2018-10-30</td>\n",
|
|
" <td>2018-10-30</td>\n",
|
|
" <td>-65.78</td>\n",
|
|
" <td>AUTOMOBILE AA000000020508691 RMS18302072583746HI</td>\n",
|
|
" <td>680.12</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" Date Date de valeur Montant \\\n",
|
|
"7 2018-10-02 2018-10-02 -23.10 \n",
|
|
"9 2018-10-05 2018-10-01 -6.25 \n",
|
|
"26 2018-10-15 2018-11-14 -16.00 \n",
|
|
"29 2018-10-17 2018-10-17 -22.00 \n",
|
|
"58 2018-10-30 2018-10-30 -65.78 \n",
|
|
"\n",
|
|
" Libellé Solde \n",
|
|
"7 HABITAT BQ6459900 1827599 BQ6459900 299.49 \n",
|
|
"9 F FRAIS BANCAIRES MENSUALISES 593.24 \n",
|
|
"26 F COMM INTERVENTION 6 OPER -96.05 \n",
|
|
"29 VIR SEPA JULIE AVELLANA 176.35 \n",
|
|
"58 AUTOMOBILE AA000000020508691 RMS18302072583746HI 680.12 "
|
|
]
|
|
},
|
|
"execution_count": 115,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"select_mots(oct_depenses, \"Libellé\", [\"PAIEMENT\", \"RETRAIT\"], inverse=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 116,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-133.13"
|
|
]
|
|
},
|
|
"execution_count": 116,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"_[\"Montant\"].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Mois de Novembre "
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 117,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"nov_op = operations[(operations[\"Date\"] >= \"2018-11\") & (operations[\"Date\"] < \"2018-12\")]"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Total des dépenses"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 56,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-1108.68"
|
|
]
|
|
},
|
|
"execution_count": 56,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"nov_depenses = nov_op[nov_op[\"Montant\"]<0]\n",
|
|
"nov_depenses[\"Montant\"].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Retraits"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 57,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-200.0"
|
|
]
|
|
},
|
|
"execution_count": 57,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"nov_depenses[nov_depenses[\"Libellé\"].str.contains(\"RETRAIT\")]['Montant'].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Paiements directs"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 58,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-878.0299999999999"
|
|
]
|
|
},
|
|
"execution_count": 58,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"nov_depenses[nov_depenses[\"Libellé\"].str.contains(\"PAIEMENT\")]['Montant'].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Autres"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 59,
|
|
"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>Date</th>\n",
|
|
" <th>Date de valeur</th>\n",
|
|
" <th>Montant</th>\n",
|
|
" <th>Libellé</th>\n",
|
|
" <th>Solde</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>66</th>\n",
|
|
" <td>2018-11-01</td>\n",
|
|
" <td>2018-11-01</td>\n",
|
|
" <td>-11.00</td>\n",
|
|
" <td>VIR SEPA PARTAGE INTERNET</td>\n",
|
|
" <td>342.13</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>68</th>\n",
|
|
" <td>2018-11-02</td>\n",
|
|
" <td>2018-11-02</td>\n",
|
|
" <td>-13.40</td>\n",
|
|
" <td>HABITAT BQ6459900 1830699 BQ6459900</td>\n",
|
|
" <td>326.83</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>73</th>\n",
|
|
" <td>2018-11-06</td>\n",
|
|
" <td>2018-11-01</td>\n",
|
|
" <td>-6.25</td>\n",
|
|
" <td>F FRAIS BANCAIRES MENSUALISES</td>\n",
|
|
" <td>186.38</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" Date Date de valeur Montant Libellé \\\n",
|
|
"66 2018-11-01 2018-11-01 -11.00 VIR SEPA PARTAGE INTERNET \n",
|
|
"68 2018-11-02 2018-11-02 -13.40 HABITAT BQ6459900 1830699 BQ6459900 \n",
|
|
"73 2018-11-06 2018-11-01 -6.25 F FRAIS BANCAIRES MENSUALISES \n",
|
|
"\n",
|
|
" Solde \n",
|
|
"66 342.13 \n",
|
|
"68 326.83 \n",
|
|
"73 186.38 "
|
|
]
|
|
},
|
|
"execution_count": 59,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"autres = nov_depenses[~nov_depenses[\"Libellé\"].str.contains(\"PAIEMENT\") & ~nov_depenses[\"Libellé\"].str.contains(\"RETRAIT\")]\n",
|
|
"autres"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 61,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"-30.65"
|
|
]
|
|
},
|
|
"execution_count": 61,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"autres[\"Montant\"].sum()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"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.7.1"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|