This repository demonstrates how to run full Python workflows directly inside Excel using xlwings Lite. It includes examples of data transformations, automations, statistical analysis, machine learning models, and external system integrations.
xlwings Lite is a powerful addition to the data scientist's toolkit that allows you to run Python code directly within Excel. This repository contains practical examples showing how to leverage this capability for various data analysis and machine learning tasks.
- 🔄 Data Transformations: Complex Excel operations using Python
- 🤖 Automations: Excel workflow automation without VBA
- 📊 Statistical Analysis: Advanced statistical operations
- 🧠 Machine Learning: XGBoost model implementation
- 📈 Visualizations: ROC curves, gain charts, and more
- 🔍 Feature Engineering: Data preparation and analysis
- 🔌 External Connections: API calls and remote database integration
- 📱 Web Integration: Connect to any system with API access
- Generate random samples from multiple probability distributions (Uniform, Triangular, Normal, Log-Normal)
- Interactive input parameters with P10, P50, P90 values
- Dynamic visualization of distributions with histograms
- Statistical analysis including mean, standard deviation, and percentiles
- Cumulative distribution plots for risk analysis
- Automated dashboard generation with multiple charts
- Real-time updates of statistical measures
- Support for oil and gas reserve calculations
- Customizable input parameters and distribution types
- Loads data from Excel tables
- Performs feature engineering
- Trains XGBoost model
- Generates decile tables
- Creates ROC and gain curves
- Exports results back to Excel
- Table formatting and data preparation
- Weighted scoring implementation
- Multicollinearity analysis
- Results visualization
- Connect to remote PostgreSQL database
- Explore tables and execute custom SQL queries
- Pull and analyze data directly from Excel
- Generate descriptive statistics and visualizations
- Build and evaluate ML models on remote data
- Connect to external systems via API
- Remote database connections through web layer
- FastAPI server integration for secure database access
- Support for various API endpoints (databases, LLMs)
- API calls to OpenAI, Gemini, and Claude Sonnet
- Structured output using JSON schemas
- Automation capabilities with LLM responses
- Dynamic sheet creation and management
- Custom table formatting
- Automated report generation
- Interactive chart creation
-
Installation
# Install xlwings Add-in in Excel
-
Usage
- Open the Excel files in this repository
- Use the xlwings interface to run the scripts
- View results in new sheets within the workbook