Skip to content
Docs
Open Bearly

Analyze data with Code Interpreter

Let Bearly run Python for calculations, data analysis, charts, file conversion, and generated files.

⋯
View as markdown

Code Interpreter lets Bearly use Python when a question needs reliable calculation or file processing. It is useful for analyzing tables, creating charts, transforming files, and solving multi-step quantitative problems.

  1. Attach the source material

    Select the plus icon → Attach files, or drag the files into the chat. Code Interpreter cannot see files on your computer unless you attach them.

  2. Ask for the decision or output you need

    Name the fields to use, the calculation to perform, and the form of the result. For example:

    Analyze this sales spreadsheet. Compare revenue and gross margin by region, flag unusual month-over-month changes, and create a CSV with the underlying summary table.

    Bearly can choose Code Interpreter automatically when the task calls for it.

  3. Choose Run Python when you want to require it

    Type /python in the composer, select Run Python under Tools, then type the task and send it.

  4. Review the run and its results

    While the work is in progress, the line under the answer names the step. Select it to open Steps, then select the Run Python step to expand the Input and Result. If execution fails, the expanded step shows Error instead.

    Bearly explains the result in the conversation. Charts appear as previews, and generated spreadsheets, documents, images, or other files appear with the response.

Select a generated file to open it in the side panel, then use Download next to its tab. You can also find it later by selecting the chat’s title → Files.

To continue working, stay in the same conversation and refer to the generated file by name:

Using the regional-summary.csv you just created, add each region's share of annual revenue and sort from highest to lowest.

Each execution starts with a fresh workspace. Bearly can reuse an earlier output only by supplying that generated file to the next run, so naming the file removes ambiguity.

  • Calculate statistics, financial scenarios, or other multi-step math.
  • Inspect, filter, join, summarize, or reshape CSV and spreadsheet data.
  • Create charts and save the underlying data as a file.
  • Convert or modify documents, images, audio, and other supported files.
  • Generate a clean CSV, spreadsheet, document, image, or text file from computed results.

For an inline KPI, bar chart, or line chart whose source data stays attached, see Create charts from spreadsheets. For a persistent interactive interface, such as a calculator or dashboard that someone will operate, create a Page instead.

Code Interpreter runs away from your device. It cannot use your local applications, folders, or installed software, and it does not keep a working directory between executions. It can retrieve public internet resources when needed.

Each run stops after 60 seconds and has 2 GB of memory and one CPU core. A run that hits the time limit says so; split long work, such as text recognition over many pages, into several runs. A single run can return up to five output files.

If a run fails:

  • Expand Run Python and read Error for the immediate cause.
  • Confirm every required input file is attached and readable.
  • Ask Bearly to correct the code and rerun it; you do not need to write the correction yourself.
  • Split a large dataset or multi-stage job into smaller tasks, saving an intermediate file between stages.

For consequential work, ask Bearly to show its assumptions and validation checks. Review the source data and generated file before relying on the result.

When the result needs to be a polished PDF, Word document, presentation, or spreadsheet rather than an analysis file, use Document Editor.