AI Disruption

AI Disruption

Share this post

AI Disruption
AI Disruption
Using Code Interpreter in Assistants for Data Analysis(Development of large model applications 4)

Using Code Interpreter in Assistants for Data Analysis(Development of large model applications 4)

Revolutionize Your Data Analysis Workflow with OpenAI's Code Interpreter

Meng Li's avatar
Meng Li
Jun 30, 2024
∙ Paid
1

Share this post

AI Disruption
AI Disruption
Using Code Interpreter in Assistants for Data Analysis(Development of large model applications 4)
1
Share
In the Era of Large Model Applications, Everyone Can Be a Programmer (Development of large model applications 1)

In the Era of Large Model Applications, Everyone Can Be a Programmer (Development of large model applications 1)

Meng Li
·
June 25, 2024
Read full story
Order Management Using OpenAI Assistants' Functions(Development of large model applications 2)

Order Management Using OpenAI Assistants' Functions(Development of large model applications 2)

Meng Li
·
June 27, 2024
Read full story
Thread and Run State Analysis in OpenAI Assistants(Development of large model applications 3)

Thread and Run State Analysis in OpenAI Assistants(Development of large model applications 3)

Meng Li
·
June 28, 2024
Read full story
Using Code Interpreter in Assistants for Data Analysis(Development of large model applications 4)

Using Code Interpreter in Assistants for Data Analysis(Development of large model applications 4)

Meng Li
·
June 30, 2024
Read full story

Hello everyone, welcome to the "Development of Large Model Applications" column.

In the previous two articles, we learned how to use Function, as well as the concepts of Thread and Run. Today, let's take it easy and discuss something simpler.

Let's explore how to use the Code Interpreter in Assistants for data analysis.

What is a Code Interpreter?

The name "Code Interpreter" might be misleading. Initially, I thought it was a powerful code analysis tool like GitHub Copilot or CodeLlama, capable of analyzing, completing, or generating code to help developers improve efficiency and code quality.

I assumed that if I fed it a bunch of code, the Code Interpreter would analyze it for me (even though ChatGPT can already handle such tasks without any tools).

However, the Code Interpreter is actually designed to assist with data analysis based on data files. It provides an end-to-end service: generating data analysis code, running it, and presenting the results.

According to OpenAI, the Code Interpreter is a tool hosted on OpenAI servers that allows you to read, process, and analyze data files using Python code.

It supports various common file formats, such as CSV, JSON, and PDF, and can perform slicing, filtering, sorting, grouping, and aggregation operations. It also has built-in data visualization capabilities, allowing you to generate line charts, bar charts, pie charts, and more with one click.

OpenAI charges $0.03 per session for using the Code Interpreter, with each session lasting 1 hour by default.

The Code Interpreter is not only available in Assistants but is also seamlessly integrated into ChatGPT.

For example, if I have a sales data file as shown below, I can use ChatGPT (GPT-4) to analyze the data for me.

https://github.com/dlimeng/awesome-ai-generated/blob/main/openai/flower_sales.csv

After uploading it to GPT-4, ChatGPT's analysis results are shown below.

These results are not just simple text summaries but are processed through Python code.

When we select the following arrows in the ChatGPT interface, we can see the Python code and the generated data analysis results.

In this process, ChatGPT uses the Code Interpreter functionality.

However, the Code Interpreter is now embedded within ChatGPT, and ChatGPT knows when to call it.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Meng Li
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share