diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f5e96db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv \ No newline at end of file diff --git a/How_To_Run.md b/How_To_Run.md new file mode 100644 index 0000000..ffd95e0 --- /dev/null +++ b/How_To_Run.md @@ -0,0 +1,27 @@ +# Prerequisites: + - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) + - [Python](https://www.python.org/downloads/) + - [Ollama](https://github.com/ollama/ollama?tab=readme-ov-file) + - [VSCode](https://code.visualstudio.com/download) + +# Setup + +```zsh +git clone git@github.com:thu-vu92/local-llms-analyse-finance.git + +cd local-llms-analyse-finance && code . + +# Once opened in VSCode, Install any extenstions recommended for Jupyter and Python. + +# Might serve you better to setup a python virtual env for the project +python3 -m venv venv && source venv/bin/activate +pip3 install pydantic pandas +``` + + - Select the newly created python environment at top right of the Jupyter file in VSCode. +![Select virtual env](./screenshots/select_kernel.png) + + - "Run All" in categorize_expenses_with_validation.ipynb file. You might have to uncomment the top pip3 install line since you're likely to lack the dependencies (same for other files). +![Run all](./screenshots/run_all.png) + + - Now that the categorized transactions are generated, 'Run All' in dashboard.ipynb (be mindful of dependencies) and your dashboard should be up and launch on local browser. diff --git a/categorize_expenses_with_validation.ipynb b/categorize_expenses_with_validation.ipynb index 092f225..fbc2c0e 100644 --- a/categorize_expenses_with_validation.ipynb +++ b/categorize_expenses_with_validation.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -11,7 +11,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -20,16 +20,16 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'\\nThe first man on the moon was Neil Armstrong. He stepped foot on the moon\\'s surface on July 20, 1969, during the Apollo 11 mission. Armstrong famously declared \"That\\'s one small step for man, one giant leap for mankind\" as he became the first person to walk on the lunar surface.'" + "'\\nThe first man on the moon was Neil Armstrong. He stepped foot on the lunar surface on July 20, 1969, as part of the Apollo 11 mission. Armstrong famously declared \"That\\'s one small step for man, one giant leap for mankind\" after becoming the first person to walk on the moon.'" ] }, - "execution_count": 3, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -41,16 +41,16 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'\\nCertainly! Here are the categories for each of the expenses you provided:\\n\\n* Spotify AB by Adyen - Entertainment\\n* Beta Boulders Ams Amsterdam Nld - Sports\\n* ISS Catering Services De Meern - Food and Beverage\\n* Vishandel Sier AMSTELVEEN - Retail\\n* Ministerie van Justitie en Veiligheid - Government\\n* Etos AMSTERDAM NLD - Retail\\n* Bistro Bar Amsterdam - Food and Beverage'" + "'\\nCertainly! Here are the categories for each of the expenses you provided:\\n\\nSpotify AB by Adyen - Entertainment\\nBeta Boulders Ams Amsterdam Nld - Sports\\nISS Catering Services De Meern - Food and Beverage\\nVishandel Sier AMSTELVEEN - Food and Beverage\\nMinisterie van Justitie en Veiligheid - Government\\nEtos AMSTERDAM NLD - Convenience Store\\nBistro Bar Amsterdam - Food and Beverage'" ] }, - "execution_count": 8, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -70,9 +70,23 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 18, "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/4y/20c60c3x3476c1_zstk9vzj40000gn/T/ipykernel_32108/3553452196.py:2: DeprecationWarning: \n", + "Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),\n", + "(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)\n", + "but was not found to be installed on your system.\n", + "If this would cause problems for you,\n", + "please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466\n", + " \n", + " import pandas as pd\n" + ] + }, { "data": { "text/html": [ @@ -149,7 +163,7 @@ "4 2023-12-29 Selling Paintings Income 13.63" ] }, - "execution_count": 5, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -163,7 +177,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -172,7 +186,7 @@ "23" ] }, - "execution_count": 14, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -185,20 +199,19 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "array(['Tesco Amstelveen', 'Monthly Appartment Rent',\n", - " 'Vishandel Sier Amstelveen', 'Selling Paintings',\n", - " 'Spotify Ab By Adyen', 'Tls Bv Inz Ov-Chipkaart',\n", - " 'Tikkie Zakelijk', 'Tk Maxx Amsterdam Da', 'Consulting'],\n", - " dtype=object)" + "array(['Tesco Breda', 'Monthly Appartment Rent',\n", + " 'Vishandel Sier Amsterdam', 'Selling Paintings',\n", + " 'Spotify Ab By Adyen', 'Tk Maxx Amsterdam Da', 'Consulting',\n", + " 'Aidsfonds', 'Tls Bv Inz Ov-Chipkaart'], dtype=object)" ] }, - "execution_count": 45, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -216,7 +229,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -225,7 +238,7 @@ "[0, 23]" ] }, - "execution_count": 15, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -244,7 +257,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -253,7 +266,7 @@ "ResponseChecks(data=None)" ] }, - "execution_count": 7, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -279,20 +292,16 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ "def categorize_transactions(transaction_names, llm):\n", - " response = llm.invoke(\"Can you add an appropriate category to the following expenses. For example: Spotify AB by Adyen - Entertainment, Beta Boulders Ams Amsterdam Nld - Sport, etc.. Categories should be less than 4 words. \" + transaction_names)\n", - " response = response.split('\\n')\n", + " original_response = llm.invoke(\"Can you add an appropriate category to the following expenses. For example: Spotify AB by Adyen - Entertainment, Beta Boulders Ams Amsterdam Nld - Sport, etc.. Categories should be less than 4 words. \" + transaction_names)\n", + " response = original_response.split('\\n')\n", "\n", - " # Keep only the lines in between blank lines (removing the explaination lines at the beginning and end of the response)\n", - " blank_indexes = [index for index in range(len(response)) if response[index] == '']\n", - " if len(blank_indexes) == 1:\n", - " response = response[(blank_indexes[0] + 1):]\n", - " else:\n", - " response = response[(blank_indexes[0] + 1) : blank_indexes[1]]\n", + " # Keep only the lines with categories (removing the explaination lines at the beginning and end of the response)\n", + " response = [item for item in response if item != '' and ' - ' in item]\n", "\n", " # Print response and validate if it is in the correct format\n", " print(response)\n", @@ -307,14 +316,14 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 24, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "['1. Spotify AB by Adyen - Entertainment', '2. Beta Boulders Ams Amsterdam Nld - Sport', '3. ISS Catering Services De Meern - Food', '4. Vishandel Sier AMSTELVEEN - Grocery', '5. Etos AMSTERDAM NLD - Convenience', '6. Bistro Bar Amsterdam - Food']\n" + "['1. Spotify AB by Adyen - Entertainment', '2. Beta Boulders Ams Amsterdam Nld - Sport', '3. ISS Catering Services De Meern - Food', '4. Vishandel Sier AMSTELVEEN - Food', '5. Etos AMSTERDAM NLD - Food', '6. Bistro Bar Amsterdam - Food, Drink']\n" ] }, { @@ -364,21 +373,21 @@ " \n", " \n", " 3\n", - " 4. Vishandel Sier AMSTELVEEN - Grocery\n", + " 4. Vishandel Sier AMSTELVEEN - Food\n", " 4. Vishandel Sier AMSTELVEEN\n", - " Grocery\n", + " Food\n", " \n", " \n", " 4\n", - " 5. Etos AMSTERDAM NLD - Convenience\n", + " 5. Etos AMSTERDAM NLD - Food\n", " 5. Etos AMSTERDAM NLD\n", - " Convenience\n", + " Food\n", " \n", " \n", " 5\n", - " 6. Bistro Bar Amsterdam - Food\n", + " 6. Bistro Bar Amsterdam - Food, Drink\n", " 6. Bistro Bar Amsterdam\n", - " Food\n", + " Food, Drink\n", " \n", " \n", "\n", @@ -389,20 +398,20 @@ "0 1. Spotify AB by Adyen - Entertainment \n", "1 2. Beta Boulders Ams Amsterdam Nld - Sport \n", "2 3. ISS Catering Services De Meern - Food \n", - "3 4. Vishandel Sier AMSTELVEEN - Grocery \n", - "4 5. Etos AMSTERDAM NLD - Convenience \n", - "5 6. Bistro Bar Amsterdam - Food \n", + "3 4. Vishandel Sier AMSTELVEEN - Food \n", + "4 5. Etos AMSTERDAM NLD - Food \n", + "5 6. Bistro Bar Amsterdam - Food, Drink \n", "\n", " Transaction Category \n", "0 1. Spotify AB by Adyen Entertainment \n", "1 2. Beta Boulders Ams Amsterdam Nld Sport \n", "2 3. ISS Catering Services De Meern Food \n", - "3 4. Vishandel Sier AMSTELVEEN Grocery \n", - "4 5. Etos AMSTERDAM NLD Convenience \n", - "5 6. Bistro Bar Amsterdam Food " + "3 4. Vishandel Sier AMSTELVEEN Food \n", + "4 5. Etos AMSTERDAM NLD Food \n", + "5 6. Bistro Bar Amsterdam Food, Drink " ] }, - "execution_count": 11, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -415,14 +424,14 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "['1. Belastingdienst - Taxes', '2. Tesco Breda - Groceries', '3. Monthly Appartment Rent - Housing', '4. Vishandel Sier Amsterdam - Food', '5. Selling Paintings - Art/Crafts', '6. Spotify Ab By Adyen - Entertainment', '7. Tk Maxx Amsterdam Da - Shopping', '8. Consulting - Professional Services', '9. Aidsfonds - Charity', '10. TLS BV Inz Ov-Chipkaart - Transportation', '11. Etos Amsterdam - Groceries', '12. Beta Boulders Ams Amsterdam - Fitness', '13. Salary - Personal Finance', '14. Bouldermuur Bv Amsterdam - Professional Services', '15. Birtat Restaurant Amsterdam - Dining', '16. Freelancing - Personal Finance', '17. Tikkie - Shopping', '18. Blogging - Personal Finance', '19. Taxi Utrecht - Transportation', '20. Apple Services - Technology', '21. Amazon Lux - Online Shopping', '22. Classpass* Monthly - Fitness', '23. Audible Uk AdblCo/Pymt Gbr - Entertainment']\n" + "['1. Belastingdienst - Taxes', '2. Tesco Breda - Groceries', '3. Monthly Appartment Rent - Housing', '4. Vishandel Sier Amsterdam - Food', '5. Selling Paintings - Art/Craft', '6. Spotify Ab By Adyen - Entertainment', '7. Tk Maxx Amsterdam Da - Shopping', '8. Consulting - Professional Services', '9. Aidsfonds - Charity', '10. Tls Bv Inz Ov-Chipkaart - Transportation', '11. Etos Amsterdam - Groceries', '12. Beta Boulders Ams Amsterdam - Fitness', '13. Salary - Personal Expenses', '14. Bouldermuur Bv Amsterdam - Professional Services', '15. Birtat Restaurant Amsterdam - Dining', '16. Freelancing - Personal Expenses', '17. Tikkie - Financial Services', '18. Blogging - Personal Expenses', '19. Taxi Utrecht - Transportation', '20. Apple Services - Technology', '21. Amazon Lux - Shopping', '22. Classpass* Monthly - Fitness', '23. Audible Uk AdblCo/Pymt Gbr - Entertainment']\n" ] } ], @@ -452,7 +461,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 26, "metadata": {}, "outputs": [ { @@ -508,9 +517,9 @@ " \n", " \n", " 4\n", - " 5. Selling Paintings - Art/Crafts\n", + " 5. Selling Paintings - Art/Craft\n", " 5. Selling Paintings\n", - " Art/Crafts\n", + " Art/Craft\n", " \n", " \n", "\n", @@ -522,17 +531,17 @@ "1 2. Tesco Breda - Groceries 2. Tesco Breda \n", "2 3. Monthly Appartment Rent - Housing 3. Monthly Appartment Rent \n", "3 4. Vishandel Sier Amsterdam - Food 4. Vishandel Sier Amsterdam \n", - "4 5. Selling Paintings - Art/Crafts 5. Selling Paintings \n", + "4 5. Selling Paintings - Art/Craft 5. Selling Paintings \n", "\n", - " Category \n", - "0 Taxes \n", - "1 Groceries \n", - "2 Housing \n", - "3 Food \n", - "4 Art/Crafts " + " Category \n", + "0 Taxes \n", + "1 Groceries \n", + "2 Housing \n", + "3 Food \n", + "4 Art/Craft " ] }, - "execution_count": 18, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } @@ -543,7 +552,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 27, "metadata": {}, "outputs": [], "source": [ @@ -552,33 +561,19 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 28, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "array([nan, 'Taxes', 'Groceries', 'Housing', 'Shopping', 'Art/Crafts',\n", - " 'Entertainment', 'Transportation', 'Business Services',\n", - " 'Professional Services', 'Charity/Donations', 'Food/Beverage',\n", - " 'Travel', 'Self-Employment', 'Financial Services', 'Technology',\n", - " 'Home Improvement', 'Business', 'Miscellaneous', 'Food & Beverage',\n", - " 'Health & Beauty', 'Grocery', 'Finance', 'Sport',\n", - " 'Food and Beverage', 'Travel and Transportation', 'Retail',\n", - " 'Health and Wellness', 'Education', 'Construction and Maintenance',\n", - " 'Health and Beauty', 'Clothing', 'Clothing and Accessories',\n", - " 'Travel and Leisure', 'Art & Food', 'Local Government',\n", - " 'E-commerce', 'Shipping', 'Sports & Fitness', 'Food and Drink',\n", - " 'Accommodation', 'Energy', 'Marketing and Advertising',\n", - " 'Convenience Store', 'Home and Garden', 'Real Estate',\n", - " 'Language Services', 'Legal Services', 'Sports and Fitness',\n", - " 'Business and Services', 'Travel and Tourism', 'Food & Dining',\n", - " 'Arts & Culture', 'Recreation', 'Nature & Outdoors',\n", - " 'Beauty & Wellness', 'Health & Wellness', 'Food',\n", - " 'Online Shopping', 'Subscription'], dtype=object)" + "array(['Taxes', 'Groceries', 'Housing', 'Food', 'Art/Craft',\n", + " 'Entertainment', 'Shopping', 'Professional Services', 'Charity',\n", + " 'Transportation', 'Fitness', 'Personal Expenses', 'Dining',\n", + " 'Financial Services', 'Technology'], dtype=object)" ] }, - "execution_count": 5, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } @@ -591,46 +586,9 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 29, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/var/folders/2t/5c_z4g5j7z77jprgswwd1htr0000gn/T/ipykernel_95551/1238705727.py:5: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " categories_df_all.loc[categories_df_all['Category'].str.contains(\"Food\"), 'Category'] = \"Food and Drinks\"\n", - "/var/folders/2t/5c_z4g5j7z77jprgswwd1htr0000gn/T/ipykernel_95551/1238705727.py:7: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " categories_df_all.loc[categories_df_all['Category'].str.contains(\"Clothing\"), 'Category'] = \"Clothing\"\n", - "/var/folders/2t/5c_z4g5j7z77jprgswwd1htr0000gn/T/ipykernel_95551/1238705727.py:9: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " categories_df_all.loc[categories_df_all['Category'].str.contains(\"Services\"), 'Category'] = \"Services\"\n", - "/var/folders/2t/5c_z4g5j7z77jprgswwd1htr0000gn/T/ipykernel_95551/1238705727.py:11: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " categories_df_all.loc[categories_df_all['Category'].str.contains(\"Health|Wellness\"), 'Category'] = \"Health and Wellness\"\n", - "/var/folders/2t/5c_z4g5j7z77jprgswwd1htr0000gn/T/ipykernel_95551/1238705727.py:14: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " categories_df_all.loc[categories_df_all['Category'].str.contains(\"Sport\"), 'Category'] = \"Sport and Fitness\"\n", - "/var/folders/2t/5c_z4g5j7z77jprgswwd1htr0000gn/T/ipykernel_95551/1238705727.py:16: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " categories_df_all.loc[categories_df_all['Category'].str.contains(\"Travel\"), 'Category'] = \"Travel\"\n" - ] - } - ], + "outputs": [], "source": [ "# Drop NA values\n", "categories_df_all = categories_df_all.dropna()\n", @@ -652,23 +610,9 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 30, "metadata": {}, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/var/folders/2t/5c_z4g5j7z77jprgswwd1htr0000gn/T/ipykernel_95551/2440992137.py:2: FutureWarning: The default value of regex will change from True to False in a future version.\n", - " categories_df_all['Transaction'] = categories_df_all['Transaction'].str.replace(r'\\d+\\.\\s+', '')\n", - "/var/folders/2t/5c_z4g5j7z77jprgswwd1htr0000gn/T/ipykernel_95551/2440992137.py:2: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame.\n", - "Try using .loc[row_indexer,col_indexer] = value instead\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " categories_df_all['Transaction'] = categories_df_all['Transaction'].str.replace(r'\\d+\\.\\s+', '')\n" - ] - }, { "data": { "text/html": [ @@ -697,107 +641,200 @@ " \n", " \n", " \n", - " 2\n", + " 0\n", " 1. Belastingdienst - Taxes\n", - " Belastingdienst\n", + " 1. Belastingdienst\n", " Taxes\n", " \n", " \n", - " 3\n", - " 2. Tesco Amstelveen - Groceries\n", - " Tesco Amstelveen\n", + " 1\n", + " 2. Tesco Breda - Groceries\n", + " 2. Tesco Breda\n", " Groceries\n", " \n", " \n", - " 4\n", + " 2\n", " 3. Monthly Appartment Rent - Housing\n", - " Monthly Appartment Rent\n", + " 3. Monthly Appartment Rent\n", " Housing\n", " \n", " \n", + " 3\n", + " 4. Vishandel Sier Amsterdam - Food\n", + " 4. Vishandel Sier Amsterdam\n", + " Food and Drinks\n", + " \n", + " \n", + " 4\n", + " 5. Selling Paintings - Art/Craft\n", + " 5. Selling Paintings\n", + " Art/Craft\n", + " \n", + " \n", " 5\n", - " 4. Vishandel Sier Amstelveen - Shopping\n", - " Vishandel Sier Amstelveen\n", - " Shopping\n", + " 6. Spotify Ab By Adyen - Entertainment\n", + " 6. Spotify Ab By Adyen\n", + " Entertainment\n", " \n", " \n", " 6\n", - " 5. Selling Paintings - Art/Crafts\n", - " Selling Paintings\n", - " Art/Crafts\n", + " 7. Tk Maxx Amsterdam Da - Shopping\n", + " 7. Tk Maxx Amsterdam Da\n", + " Shopping\n", " \n", " \n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", + " 7\n", + " 8. Consulting - Professional Services\n", + " 8. Consulting\n", + " Services\n", " \n", " \n", - " 351\n", - " 14. Amazon Lux - Online Shopping\n", - " Amazon Lux\n", - " Online Shopping\n", + " 8\n", + " 9. Aidsfonds - Charity\n", + " 9. Aidsfonds\n", + " Charity\n", " \n", " \n", - " 352\n", - " 15. Classpass* Monthly Missoula Usa - Subscrip...\n", - " Classpass* Monthly Missoula Usa\n", - " Subscription\n", + " 9\n", + " 10. Tls Bv Inz Ov-Chipkaart - Transportation\n", + " 10. Tls Bv Inz Ov-Chipkaart\n", + " Transportation\n", " \n", " \n", - " 353\n", - " 16. Flowingdata Livermore Usa - Business\n", - " Flowingdata Livermore Usa\n", - " Business\n", + " 10\n", + " 11. Etos Amsterdam - Groceries\n", + " 11. Etos Amsterdam\n", + " Groceries\n", " \n", " \n", - " 354\n", - " 17. Audible Uk AdblCo/Pymt Gbr - Entertainment\n", - " Audible Uk AdblCo/Pymt Gbr\n", - " Entertainment\n", + " 11\n", + " 12. Beta Boulders Ams Amsterdam - Fitness\n", + " 12. Beta Boulders Ams Amsterdam\n", + " Fitness\n", + " \n", + " \n", + " 12\n", + " 13. Salary - Personal Expenses\n", + " 13. Salary\n", + " Personal Expenses\n", + " \n", + " \n", + " 13\n", + " 14. Bouldermuur Bv Amsterdam - Professional Se...\n", + " 14. Bouldermuur Bv Amsterdam\n", + " Services\n", + " \n", + " \n", + " 14\n", + " 15. Birtat Restaurant Amsterdam - Dining\n", + " 15. Birtat Restaurant Amsterdam\n", + " Dining\n", + " \n", + " \n", + " 15\n", + " 16. Freelancing - Personal Expenses\n", + " 16. Freelancing\n", + " Personal Expenses\n", + " \n", + " \n", + " 16\n", + " 17. Tikkie - Financial Services\n", + " 17. Tikkie\n", + " Services\n", + " \n", + " \n", + " 17\n", + " 18. Blogging - Personal Expenses\n", + " 18. Blogging\n", + " Personal Expenses\n", + " \n", + " \n", + " 18\n", + " 19. Taxi Utrecht - Transportation\n", + " 19. Taxi Utrecht\n", + " Transportation\n", + " \n", + " \n", + " 19\n", + " 20. Apple Services - Technology\n", + " 20. Apple Services\n", + " Technology\n", + " \n", + " \n", + " 20\n", + " 21. Amazon Lux - Shopping\n", + " 21. Amazon Lux\n", + " Shopping\n", + " \n", + " \n", + " 21\n", + " 22. Classpass* Monthly - Fitness\n", + " 22. Classpass* Monthly\n", + " Fitness\n", " \n", " \n", - " 355\n", - " 18. Gling, Inc Middletown Usa - Business\n", - " Gling, Inc Middletown Usa\n", - " Business\n", + " 22\n", + " 23. Audible Uk AdblCo/Pymt Gbr - Entertainment\n", + " 23. Audible Uk AdblCo/Pymt Gbr\n", + " Entertainment\n", " \n", " \n", "\n", - "

313 rows × 3 columns

\n", "" ], "text/plain": [ - " Transaction vs category \\\n", - "2 1. Belastingdienst - Taxes \n", - "3 2. Tesco Amstelveen - Groceries \n", - "4 3. Monthly Appartment Rent - Housing \n", - "5 4. Vishandel Sier Amstelveen - Shopping \n", - "6 5. Selling Paintings - Art/Crafts \n", - ".. ... \n", - "351 14. Amazon Lux - Online Shopping \n", - "352 15. Classpass* Monthly Missoula Usa - Subscrip... \n", - "353 16. Flowingdata Livermore Usa - Business \n", - "354 17. Audible Uk AdblCo/Pymt Gbr - Entertainment \n", - "355 18. Gling, Inc Middletown Usa - Business \n", - "\n", - " Transaction Category \n", - "2 Belastingdienst Taxes \n", - "3 Tesco Amstelveen Groceries \n", - "4 Monthly Appartment Rent Housing \n", - "5 Vishandel Sier Amstelveen Shopping \n", - "6 Selling Paintings Art/Crafts \n", - ".. ... ... \n", - "351 Amazon Lux Online Shopping \n", - "352 Classpass* Monthly Missoula Usa Subscription \n", - "353 Flowingdata Livermore Usa Business \n", - "354 Audible Uk AdblCo/Pymt Gbr Entertainment \n", - "355 Gling, Inc Middletown Usa Business \n", + " Transaction vs category \\\n", + "0 1. Belastingdienst - Taxes \n", + "1 2. Tesco Breda - Groceries \n", + "2 3. Monthly Appartment Rent - Housing \n", + "3 4. Vishandel Sier Amsterdam - Food \n", + "4 5. Selling Paintings - Art/Craft \n", + "5 6. Spotify Ab By Adyen - Entertainment \n", + "6 7. Tk Maxx Amsterdam Da - Shopping \n", + "7 8. Consulting - Professional Services \n", + "8 9. Aidsfonds - Charity \n", + "9 10. Tls Bv Inz Ov-Chipkaart - Transportation \n", + "10 11. Etos Amsterdam - Groceries \n", + "11 12. Beta Boulders Ams Amsterdam - Fitness \n", + "12 13. Salary - Personal Expenses \n", + "13 14. Bouldermuur Bv Amsterdam - Professional Se... \n", + "14 15. Birtat Restaurant Amsterdam - Dining \n", + "15 16. Freelancing - Personal Expenses \n", + "16 17. Tikkie - Financial Services \n", + "17 18. Blogging - Personal Expenses \n", + "18 19. Taxi Utrecht - Transportation \n", + "19 20. Apple Services - Technology \n", + "20 21. Amazon Lux - Shopping \n", + "21 22. Classpass* Monthly - Fitness \n", + "22 23. Audible Uk AdblCo/Pymt Gbr - Entertainment \n", "\n", - "[313 rows x 3 columns]" + " Transaction Category \n", + "0 1. Belastingdienst Taxes \n", + "1 2. Tesco Breda Groceries \n", + "2 3. Monthly Appartment Rent Housing \n", + "3 4. Vishandel Sier Amsterdam Food and Drinks \n", + "4 5. Selling Paintings Art/Craft \n", + "5 6. Spotify Ab By Adyen Entertainment \n", + "6 7. Tk Maxx Amsterdam Da Shopping \n", + "7 8. Consulting Services \n", + "8 9. Aidsfonds Charity \n", + "9 10. Tls Bv Inz Ov-Chipkaart Transportation \n", + "10 11. Etos Amsterdam Groceries \n", + "11 12. Beta Boulders Ams Amsterdam Fitness \n", + "12 13. Salary Personal Expenses \n", + "13 14. Bouldermuur Bv Amsterdam Services \n", + "14 15. Birtat Restaurant Amsterdam Dining \n", + "15 16. Freelancing Personal Expenses \n", + "16 17. Tikkie Services \n", + "17 18. Blogging Personal Expenses \n", + "18 19. Taxi Utrecht Transportation \n", + "19 20. Apple Services Technology \n", + "20 21. Amazon Lux Shopping \n", + "21 22. Classpass* Monthly Fitness \n", + "22 23. Audible Uk AdblCo/Pymt Gbr Entertainment " ] }, - "execution_count": 8, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -810,7 +847,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 31, "metadata": {}, "outputs": [ { @@ -850,19 +887,19 @@ " Belastingdienst\n", " Expense\n", " 9.96\n", - " 1. Belastingdienst - Taxes\n", - " Belastingdienst\n", - " Taxes\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", " 1\n", " 2023-12-30\n", - " Tesco Amstelveen\n", + " Tesco Breda\n", " Expense\n", " 17.53\n", - " 2. Tesco Amstelveen - Groceries\n", - " Tesco Amstelveen\n", - " Groceries\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", " 2\n", @@ -870,19 +907,19 @@ " Monthly Appartment Rent\n", " Expense\n", " 451.00\n", - " 3. Monthly Appartment Rent - Housing\n", - " Monthly Appartment Rent\n", - " Housing\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", " 3\n", " 2023-12-30\n", - " Vishandel Sier Amstelveen\n", + " Vishandel Sier Amsterdam\n", " Expense\n", " 12.46\n", - " 4. Vishandel Sier Amstelveen - Shopping\n", - " Vishandel Sier Amstelveen\n", - " Shopping\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", " 4\n", @@ -890,52 +927,232 @@ " Selling Paintings\n", " Income\n", " 13.63\n", - " 5. Selling Paintings - Art/Crafts\n", - " Selling Paintings\n", - " Art/Crafts\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 5\n", + " 2023-12-29\n", + " Spotify Ab By Adyen\n", + " Expense\n", + " 12.19\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 6\n", + " 2023-12-23\n", + " Tk Maxx Amsterdam Da\n", + " Expense\n", + " 27.08\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", + " 7\n", + " 2023-12-22\n", + " Consulting\n", + " Income\n", + " 541.57\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 8\n", + " 2023-12-22\n", + " Aidsfonds\n", + " Expense\n", + " 10.70\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 9\n", + " 2023-12-20\n", + " Consulting\n", + " Income\n", + " 2641.93\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 10\n", + " 2023-12-19\n", + " Tls Bv Inz Ov-Chipkaart\n", + " Expense\n", + " 18.90\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 11\n", + " 2023-12-18\n", + " Etos Amsterdam\n", + " Expense\n", + " 17.67\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 12\n", + " 2023-12-18\n", + " Tesco Breda\n", + " Expense\n", + " 8.81\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 13\n", + " 2023-12-18\n", + " Beta Boulders Ams Amsterdam\n", + " Expense\n", + " 6.94\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 14\n", + " 2022-11-26\n", + " Salary\n", + " Income\n", + " 14.36\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 15\n", + " 2022-11-26\n", + " Bouldermuur Bv Amsterdam\n", + " Expense\n", + " 19.27\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 16\n", + " 2022-11-26\n", + " Birtat Restaurant Amsterdam\n", + " Expense\n", + " 24.71\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 17\n", + " 2022-11-25\n", + " Tesco Breda\n", + " Expense\n", + " 17.35\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 18\n", + " 2022-11-24\n", + " Freelancing\n", + " Income\n", + " 2409.55\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 19\n", + " 2022-11-19\n", + " Tikkie\n", + " Expense\n", + " 20.76\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 20\n", + " 2022-10-25\n", + " Blogging\n", + " Income\n", + " 4044.27\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 21\n", + " 2022-10-24\n", + " Taxi Utrecht\n", + " Expense\n", + " 18.90\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 22\n", + " 2022-10-23\n", + " Tesco Breda\n", + " Expense\n", + " 27.54\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 23\n", + " 2022-10-22\n", + " Apple Services\n", + " Expense\n", + " 41.25\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 24\n", + " 2022-10-21\n", + " Tesco Breda\n", + " Expense\n", + " 22.80\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", - " 1561\n", + " 25\n", " 2022-01-16\n", " Amazon Lux\n", " Expense\n", " 24.11\n", - " 14. Amazon Lux - Online Shopping\n", - " Amazon Lux\n", - " Online Shopping\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", - " 1562\n", + " 26\n", " 2022-01-15\n", - " Classpass* Monthly Missoula Usa\n", + " Classpass* Monthly\n", " Expense\n", " 30.08\n", - " 15. Classpass* Monthly Missoula Usa - Subscrip...\n", - " Classpass* Monthly Missoula Usa\n", - " Subscription\n", - " \n", - " \n", - " 1563\n", - " 2022-01-15\n", - " Flowingdata Livermore Usa\n", - " Expense\n", - " 17.98\n", - " 16. Flowingdata Livermore Usa - Business\n", - " Flowingdata Livermore Usa\n", - " Business\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", - " 1564\n", + " 27\n", " 2022-01-14\n", " Audible Uk AdblCo/Pymt Gbr\n", " Expense\n", @@ -944,65 +1161,73 @@ " NaN\n", " NaN\n", " \n", - " \n", - " 1565\n", - " 2022-01-14\n", - " Gling, Inc Middletown Usa\n", - " Expense\n", - " 14.30\n", - " 18. Gling, Inc Middletown Usa - Business\n", - " Gling, Inc Middletown Usa\n", - " Business\n", - " \n", " \n", "\n", - "

1566 rows × 7 columns

\n", "" ], "text/plain": [ - " Date Name / Description Expense/Income \\\n", - "0 2023-12-30 Belastingdienst Expense \n", - "1 2023-12-30 Tesco Amstelveen Expense \n", - "2 2023-12-30 Monthly Appartment Rent Expense \n", - "3 2023-12-30 Vishandel Sier Amstelveen Expense \n", - "4 2023-12-29 Selling Paintings Income \n", - "... ... ... ... \n", - "1561 2022-01-16 Amazon Lux Expense \n", - "1562 2022-01-15 Classpass* Monthly Missoula Usa Expense \n", - "1563 2022-01-15 Flowingdata Livermore Usa Expense \n", - "1564 2022-01-14 Audible Uk AdblCo/Pymt Gbr Expense \n", - "1565 2022-01-14 Gling, Inc Middletown Usa Expense \n", - "\n", - " Amount (EUR) Transaction vs category \\\n", - "0 9.96 1. Belastingdienst - Taxes \n", - "1 17.53 2. Tesco Amstelveen - Groceries \n", - "2 451.00 3. Monthly Appartment Rent - Housing \n", - "3 12.46 4. Vishandel Sier Amstelveen - Shopping \n", - "4 13.63 5. Selling Paintings - Art/Crafts \n", - "... ... ... \n", - "1561 24.11 14. Amazon Lux - Online Shopping \n", - "1562 30.08 15. Classpass* Monthly Missoula Usa - Subscrip... \n", - "1563 17.98 16. Flowingdata Livermore Usa - Business \n", - "1564 11.00 NaN \n", - "1565 14.30 18. Gling, Inc Middletown Usa - Business \n", + " Date Name / Description Expense/Income Amount (EUR) \\\n", + "0 2023-12-30 Belastingdienst Expense 9.96 \n", + "1 2023-12-30 Tesco Breda Expense 17.53 \n", + "2 2023-12-30 Monthly Appartment Rent Expense 451.00 \n", + "3 2023-12-30 Vishandel Sier Amsterdam Expense 12.46 \n", + "4 2023-12-29 Selling Paintings Income 13.63 \n", + "5 2023-12-29 Spotify Ab By Adyen Expense 12.19 \n", + "6 2023-12-23 Tk Maxx Amsterdam Da Expense 27.08 \n", + "7 2023-12-22 Consulting Income 541.57 \n", + "8 2023-12-22 Aidsfonds Expense 10.70 \n", + "9 2023-12-20 Consulting Income 2641.93 \n", + "10 2023-12-19 Tls Bv Inz Ov-Chipkaart Expense 18.90 \n", + "11 2023-12-18 Etos Amsterdam Expense 17.67 \n", + "12 2023-12-18 Tesco Breda Expense 8.81 \n", + "13 2023-12-18 Beta Boulders Ams Amsterdam Expense 6.94 \n", + "14 2022-11-26 Salary Income 14.36 \n", + "15 2022-11-26 Bouldermuur Bv Amsterdam Expense 19.27 \n", + "16 2022-11-26 Birtat Restaurant Amsterdam Expense 24.71 \n", + "17 2022-11-25 Tesco Breda Expense 17.35 \n", + "18 2022-11-24 Freelancing Income 2409.55 \n", + "19 2022-11-19 Tikkie Expense 20.76 \n", + "20 2022-10-25 Blogging Income 4044.27 \n", + "21 2022-10-24 Taxi Utrecht Expense 18.90 \n", + "22 2022-10-23 Tesco Breda Expense 27.54 \n", + "23 2022-10-22 Apple Services Expense 41.25 \n", + "24 2022-10-21 Tesco Breda Expense 22.80 \n", + "25 2022-01-16 Amazon Lux Expense 24.11 \n", + "26 2022-01-15 Classpass* Monthly Expense 30.08 \n", + "27 2022-01-14 Audible Uk AdblCo/Pymt Gbr Expense 11.00 \n", "\n", - " Transaction Category \n", - "0 Belastingdienst Taxes \n", - "1 Tesco Amstelveen Groceries \n", - "2 Monthly Appartment Rent Housing \n", - "3 Vishandel Sier Amstelveen Shopping \n", - "4 Selling Paintings Art/Crafts \n", - "... ... ... \n", - "1561 Amazon Lux Online Shopping \n", - "1562 Classpass* Monthly Missoula Usa Subscription \n", - "1563 Flowingdata Livermore Usa Business \n", - "1564 NaN NaN \n", - "1565 Gling, Inc Middletown Usa Business \n", - "\n", - "[1566 rows x 7 columns]" + " Transaction vs category Transaction Category \n", + "0 NaN NaN NaN \n", + "1 NaN NaN NaN \n", + "2 NaN NaN NaN \n", + "3 NaN NaN NaN \n", + "4 NaN NaN NaN \n", + "5 NaN NaN NaN \n", + "6 NaN NaN NaN \n", + "7 NaN NaN NaN \n", + "8 NaN NaN NaN \n", + "9 NaN NaN NaN \n", + "10 NaN NaN NaN \n", + "11 NaN NaN NaN \n", + "12 NaN NaN NaN \n", + "13 NaN NaN NaN \n", + "14 NaN NaN NaN \n", + "15 NaN NaN NaN \n", + "16 NaN NaN NaN \n", + "17 NaN NaN NaN \n", + "18 NaN NaN NaN \n", + "19 NaN NaN NaN \n", + "20 NaN NaN NaN \n", + "21 NaN NaN NaN \n", + "22 NaN NaN NaN \n", + "23 NaN NaN NaN \n", + "24 NaN NaN NaN \n", + "25 NaN NaN NaN \n", + "26 NaN NaN NaN \n", + "27 NaN NaN NaN " ] }, - "execution_count": 32, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -1017,7 +1242,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 32, "metadata": {}, "outputs": [], "source": [ @@ -1041,7 +1266,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.6" + "version": "3.9.6" } }, "nbformat": 4, diff --git a/picture.png b/picture.png new file mode 100644 index 0000000..5ff52d3 Binary files /dev/null and b/picture.png differ diff --git a/screenshots/run_all.png b/screenshots/run_all.png new file mode 100644 index 0000000..cee6b9d Binary files /dev/null and b/screenshots/run_all.png differ diff --git a/screenshots/select_kernel.png b/screenshots/select_kernel.png new file mode 100644 index 0000000..ae921db Binary files /dev/null and b/screenshots/select_kernel.png differ