This Python project lets you explore and compare key physical and nutritional properties of various fruits.
It’s a simple, interactive script that uses a clean dataset along with pandas and matplotlib to display information in both table and chart form.
It’s perfect for anyone curious about fruits, nutrition, or just looking to practice Python data handling and visualization.
The dataset includes multiple fruits, with fields like:
- 🍏 Fruit Name
- 🎨 Color
- ⚖️ Average Weight (g)
- 🔥 Energy (kcal)
- 🥩 Protein (g)
- 🧈 Fat (g)
- 🍞 Carbohydrates (g)
- 🌾 Fiber (g)
- 🍬 Sugar (g)
- 💧 Water (%)
The data has been cleaned and formatted to work seamlessly with the script.
This script allows you to:
- Select a fruit property (e.g., calories, sugar, fiber)
- Choose one, multiple, or all fruits for comparison
- View a neat, pandas-based table of the results
- Automatically generate a bar chart to visualize differences
The interaction is entirely menu-driven, so you don’t need to modify any code — just run the script and follow the prompts.
Make sure the following files are in the same folder:
fruits.csvmain.py
Open your terminal and run:
python main.py