A Python-based workflow that leverages large language models (LLMs) to automate data analytics processes. The code integrates with the OpenAI API to assist with data cleaning, exploratory data analysis (EDA), statistical analysis, and predictive forecasting.
- Data Cleaning: Uses LLM to generate cleaning instructions for handling missing values, outliers, and data type conversions
- Exploratory Data Analysis: Automatically selects relevant numerical columns and generates visualizations
- Statistical Analysis: Computes correlations and uses LLM to identify meaningful relationships
- Predictive Analysis: Performs time-series forecasting with Holt-Winters exponential smoothing
- Python 3.8+
- OpenAI API key
- Required packages listed in
requirements.txt
- Clone the repository:
git clone https://github.com/yourusername/llm-data-analytics.git
cd llm-data-analytics- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create a
.envfile with your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
- Place your dataset CSV file in the project directory
- Update the
file_pathvariable inprompt_chaining.pyto match your CSV filename - Run the script:
python prompt_chaining.pyThis project is licensed under the MIT License - see the LICENSE file for details.