Skip to content

amararun/shared-xlwings-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Excel Data Analysis & ML Workflows with xlwings Lite

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.

Overview

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.

Key Features Demonstrated

  • 🔄 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

Example Workflows

1. Monte Carlo Simulation & Distribution Analysis

  • 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

2. XGBoost Response Model

  • Loads data from Excel tables
  • Performs feature engineering
  • Trains XGBoost model
  • Generates decile tables
  • Creates ROC and gain curves
  • Exports results back to Excel

3. Credit Card Segment Analysis

  • Table formatting and data preparation
  • Weighted scoring implementation
  • Multicollinearity analysis
  • Results visualization

4. Remote Database Integration

  • 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

Advanced Features

API Integration

  • 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)

LLM Integration

  • API calls to OpenAI, Gemini, and Claude Sonnet
  • Structured output using JSON schemas
  • Automation capabilities with LLM responses

Excel Object Manipulation

  • Dynamic sheet creation and management
  • Custom table formatting
  • Automated report generation
  • Interactive chart creation

Getting Started

  1. Installation

    # Install xlwings Add-in in Excel
    
  2. Usage

    • Open the Excel files in this repository
    • Use the xlwings interface to run the scripts
    • View results in new sheets within the workbook

Resources

Documentation & Guides

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published