A powerful Streamlit-based application for processing Excel files with AI-powered suggestions for data analysis. This tool allows users to upload Excel files, create derived columns, and define flag rules with the assistance of AI suggestions.
- Upload Excel files (.xlsx, .xls)
- Preview data with interactive row selection
- Crop data to selected rows
- Export processed data to CSV
- Create new columns using pandas-compatible formulas
- AI-suggested column operations
- Track column creation history
- Remove columns with one click
- Real-time formula evaluation
- Define custom flag rules using simple conditions
- AI-suggested flagging rules
- Track rule history
- Remove rules easily
- Automatic flag column creation
- Powered by Google's Gemini AI
- Context-aware suggestions
- Natural language query processing
- Interactive suggestion application
- Example operations for reference
excel_processor/
├── README.md
├── requirements.txt
├── .env.example
├── setup.py
└── src/
├── __init__.py
├── main.py
├── models/
│ ├── __init__.py
│ └── schemas.py
├── services/
│ ├── __init__.py
│ ├── ai_service.py
│ ├── excel_processor.py
│ └── logger.py
└── ui/
├── __init__.py
├── components.py
└── pages.py
-
ExcelProcessor (services/excel_processor.py)
- Core data processing functionality
- DataFrame management
- Column and rule history tracking
- Error handling and validation
-
AIService (services/ai_service.py)
- AI integration using LiteLLM
- Prompt engineering
- Response processing
- Suggestion generation
-
UI Components (ui/)
- Streamlit interface components
- User interaction handling
- Data visualization
- State management
- Python 3.12.9
- Virtual environment (recommended)
- Google API Key for AI features
- Clone the repository:
git clone https://github.com/yourusername/excel-processor.git
cd excel-processor- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install the package:
pip install -e .- Set up environment variables:
cp .env.example .env
# Edit .env and add your GOOGLE_API_KEYstreamlit run src/main.py- Click "Upload Excel File" button
- Select your Excel file
- Preview data and adjust row selection if needed
# Example formulas:
Revenue = Price * Quantity
Discount = Price * 0.1
Profit_Margin = (Price - Cost) / Price# Example rules:
Price > 100
Quantity < 5
Revenue > 1000- Enter your query in natural language
- Review AI suggestions
- Apply suggested operations with one click
GOOGLE_API_KEY=your_api_key_here
LOG_LEVEL=INFO-
Modify logging configuration in
services/logger.py -
Adjust AI prompts in
services/ai_service.py -
Customize UI components in
ui/components.py -
Include docstrings for all functions/classes
-
Add comments for complex logic



