Learn how to upload files and use ChatGPT's built-in Code Interpreter for data analysis, statistical computations, chart creation, and automated reporting.
## What is Code Interpreter?
ChatGPT's Code Interpreter lets ChatGPT write and execute Python code in a secure sandbox. It can process uploaded files, perform calculations, create visualizations, and generate downloadable outputs.
## Getting Started
Code Interpreter is available by default in ChatGPT Plus, Team, and Enterprise. Drag and drop files into the chat or click the attachment icon.
### Supported File Types
CSV, XLSX, XLS, PDF, DOCX, TXT, JSON, XML, PNG, JPG, Python, JS, HTML, CSS
## Common Data Analysis Tasks
### Exploratory Data Analysis
Upload a CSV and ask: "Analyze this dataset. Show shape, data types, missing values, and summary statistics."
### Data Cleaning
- "Remove duplicate rows and fill missing values with the column median"
- "Standardize the date format to YYYY-MM-DD"
- "Remove outliers beyond 3 standard deviations"
### Visualization
- "Create a bar chart showing revenue by quarter"
- "Plot a correlation heatmap for all numeric columns"
- "Generate a time series chart with trend line"
### Statistical Analysis
- "Run a t-test comparing Group A and Group B"
- "Calculate the correlation between marketing spend and revenue"
- "Perform a regression analysis predicting customer churn"
## Advanced Capabilities
ChatGPT can merge multiple datasets, pivot tables, create calculated columns, and reshape data using pandas operations.
## Pre-installed Libraries
pandas, matplotlib, seaborn, numpy, scipy, scikit-learn, statsmodels
## Tips for Best Results
1. Start with exploration before diving into analysis
2. Be specific about chart preferences
3. Iterate and build complexity gradually
4. Verify calculations against known values
5. Download important outputs during the session