This project is a simple expense tracker that allows users to log their expenses, view categorized spending, and generate basic statistics. The program uses Python and relies on pandas, matplotlib, and csv for data processing and visualization.
- Add Expenses: Users can input transaction details, including date, amount, category, and type (expense or income).
- View Expenses: Displays a summary of total spending per category.
- Show Statistics: Provides an overview of total expenses and average spending per category.
- Data Visualization: Generates a bar chart representing expenses by category.
Ensure you have the following dependencies installed:
pip install pandas matplotlib numpyRun the script and select an option from the menu:
python expenses.py- Add an Expense
- View Expenses
- Show Statistics
- Exit
When selecting option 1, the program prompts the user for:
- Date of the transaction (format:
DD-MM-YYYY) - Amount (must be greater than zero)
- Category (user-defined)
- Type (
0for expense,1for income)
The data is stored in expenses.csv.
Selecting option 2 displays a summary of total spending per category.
Option 3 provides:
- Total amount spent on expenses
- Average spending per category
At the end of the script, the program generates a bar chart displaying total expenses per category using matplotlib.
expenses.csv– Stores the expense data in CSV format.expenses.py– Main script handling user input, data processing, and visualization.
- Implementing a graphical user interface (GUI)
- Adding support for monthly and yearly breakdowns
- Exporting reports in different formats (PDF, Excel)
This project is open-source and available for modification and distribution.
Contributions and improvements are welcome. Feel free to submit a pull request or open an issue.