AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How Users Can Utilize Zhipu Qingyan's Code Interpreter to Analyze Tabular Spreadsheets and Generate Visual Charts

365Finds Editorial
Indexed 11,430 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Zhipu Qingyan (智谱清言), powered by Zhipu AI's GLM foundation models, integrates an automated Code Interpreter sandbox that transforms everyday tabular spreadsheets into structured data insights and production-ready visual charts. Rather than requiring users to write Python scripts, configure local development environments, or master complex spreadsheet formulas, the platform allows analysts, marketers, and operations professionals to upload raw spreadsheets such as Excel and CSV files and instruct the assistant in natural language. By executing code securely in a dedicated Python runtime equipped with essential data science libraries like pandas, numpy, and matplotlib, Zhipu Qingyan bridges the gap between raw business records and clear visual decision-making.

Understanding the Code Interpreter Architecture

The Code Interpreter inside Zhipu Qingyan functions as an isolated execution environment paired with an intelligent language model agent. When a user presents an analytical question alongside a spreadsheet, the system does not simply guess the answer using text prediction. Instead, it converts the user's intent into executable Python code, runs the script within a sandboxed virtual environment, captures the standard output and generated graphics, and returns the verified results directly to the chat stream.

This architecture offers several concrete advantages for business users:

Preparing and Uploading Tabular Spreadsheets

To ensure smooth analysis and avoid parsing errors in the Python environment, preparing the input spreadsheet according to clean data principles is essential.

Supported File Formats

Zhipu Qingyan accepts several structured data formats through its chat attachment interface:

Best Practices for Data Hygiene

Before uploading files to Zhipu Qingyan, standardizing layout elements minimizes processing friction:

  1. Single Header Row: Place descriptive column headers in the very first row. Avoid stacked or multi-level headers, which can require complex multi-index handling in pandas.
  2. Unmerge Cells: Merged cells in Excel frequently lead to blank values when loaded into standard data frame structures. Fill values across unmerged rows or normalize them before upload.
  3. Consistent Data Types: Ensure individual columns contain homogeneous data. For example, avoid mixing currency symbols or text annotations into purely numerical columns.
  4. Data Sanitization and Privacy: Remove or mask personally identifiable information (PII), confidential client names, internal passwords, and sensitive financial credentials prior to uploading files to any cloud-based conversational interface.

Step-by-Step Workflow: From Raw Data to Visual Charts

Utilizing Zhipu Qingyan's Code Interpreter for tabular analysis follows a structured progression from initial profiling to final visual export.

Step 1: Initial Profiling and Schema Inspection

After attaching a spreadsheet to the chat input, the first step is to establish an understanding of the dataset's structure, dimensions, and potential anomalies.

Rather than immediately requesting complex charts, prompt the assistant to conduct a preliminary inspection:

"I have uploaded our quarterly sales spreadsheet. Please inspect the dataset, display the total row and column counts, list each column name alongside its detected data type, and check for any missing or null values."

The Code Interpreter loads the file using pandas (pd.read_excel() or pd.read_csv()), inspects the schema via methods such as .info() and .isnull().sum(), and presents a clear overview. This diagnostic step verifies that numbers and dates were recognized correctly.

Step 2: Data Cleaning and Feature Engineering

Real-world spreadsheets rarely arrive in perfect analytical shape. The assistant can perform automated transformations to clean data and derive new business metrics:

A practical prompt for this phase:

"Please clean the Transaction_Date column into standard YYYY-MM-DD format. If there are missing values in the Discount column, replace them with 0. Then, create a new column called Net_Revenue equal to Gross_Sales * (1 - Discount)."

Step 3: Statistical Summaries and Aggregation

Once the data is cleaned, users can extract business insights through grouping and aggregation. Zhipu Qingyan executes pivot tables, group-by operations, and summary statistics on demand.

Useful analytical queries include:

Example instruction:

"Group the records by Region and Product_Line. Calculate total net revenue, average order size, and total transaction volume for each group. Present the results in a neatly formatted summary table sorted by total revenue in descending order."

Step 4: Generating Visual Charts

After identifying key metrics, instruct Zhipu Qingyan to produce visual representations. The Code Interpreter writes plotting scripts using matplotlib or seaborn, renders the figure, and returns it inline within the chat.

Selecting Appropriate Chart Types

Business ObjectiveRecommended Chart TypeCommon Metrics & Dimensions
Comparing performance across categoriesVertical or Horizontal Bar ChartRevenue by region, sales by product line
Tracking trends over timeLine Chart or Area ChartMonthly recurring revenue, daily active users
Analyzing composition and proportionsDonut Chart or Stacked Bar ChartMarket share, department budget breakdown
Evaluating relationships and correlationsScatter PlotAdvertising spend vs. lead conversion volume
Inspecting metric distribution and skewHistogram or Box PlotOrder value distribution, delivery time variance
Multi-dimensional performance comparisonHeatmapSales performance across months and regions

Handling Typography and Layouts

A frequent challenge in automated Python plotting is the handling of non-Latin characters and crowded axis labels. Zhipu Qingyan natively configures font properties to ensure Chinese and English characters render crisply without displaying broken boxes. To further refine chart presentation, specify formatting preferences in your prompt:

"Create a horizontal bar chart showing the top 10 products by Net_Revenue. Sort the bars so the highest revenue appears at the top. Add explicit data value labels at the end of each bar, format the x-axis with currency signs, and apply a clean, professional corporate color palette."

Step 5: Iterative Refinement and Customization

One of the greatest strengths of the conversational Code Interpreter is the ability to iteratively modify charts without starting over:

Step 6: Exporting Deliverables and Processed Files

At the conclusion of an analytical session, users typically require both the visual graphics and the underlying cleaned data:

Example prompt for file generation:

"Please save the cleaned dataset with the newly computed metrics and the regional summary table as two separate worksheets in a new Excel file named Quarterly_Sales_Analysis_Cleaned.xlsx and provide a download link."

The assistant executes df.to_excel() in the sandbox and provides a clickable link to download the completed spreadsheet.

Practical Business Scenarios and Prompt Templates

The following templates demonstrate how professionals across different departments can structure their interactions with Zhipu Qingyan's Code Interpreter:

Financial Performance and Budget Tracking

E-Commerce Sales and Inventory Monitoring

Customer Support and Operational Efficiency

Best Practices and Operational Boundaries

To maximize efficiency and maintain analytical rigor, keep these operational principles in mind:

By combining the natural language agility of GLM models with the deterministic computing power of Python, Zhipu Qingyan enables users to bypass spreadsheet friction, uncover patterns rapidly, and deliver compelling visual charts for business decisions.