Skip to main content

Data and charts

Ask the agent to analyze a CSV file or workbook, calculate figures, or make a chart. It works out the numbers with Python, then puts tables, values and chart images into your documents with edits you review as usual.

How it works#

You don't write or run code yourself. When a request needs a calculation, the agent writes a short Python script and runs it on your computer, with the project folder as its working folder. Python and common data libraries, including pandas, NumPy, SciPy, matplotlib and seaborn, come with Nebula Writer.

Each run appears in the conversation as a Python Execution card. Open Code to read the script, and Output to see what it printed. Charts appear in the card, where you can zoom in or save them. When a conversation has produced figures or files, Open artifacts at the top of the agent pane collects them with the code and output.

Files the script saves, such as figures/trend.png or analysis/summary.csv, go straight into your project. The agent doesn't use Python to write Word, PowerPoint or Excel files. It adds the results to those files with its normal edits, so they go through the review bar.

Analyze data in steps#

  1. Put the data file in the project.
  2. Ask the agent to describe the data before it calculates anything.
  3. Confirm the definitions and filters it should use.
  4. Ask for the result as a file you can open and check.
Prompt
Look at @data/orders.csv. Tell me the columns, the number of rows, any missing values, and which columns to use for on-time delivery. Don't calculate anything yet.
Prompt
Count an order as on time when Delivered Date is on or before Promised Date, and leave out cancelled orders. Save the monthly on-time rate to analysis/on-time-delivery.csv.

Open the new file from the project tree and spot-check a few rows against the source.

Make a chart#

Say what to plot, how to label it, and where to save it:

Prompt
Use analysis/on-time-delivery.csv to make a line chart of the monthly on-time rate with a dashed line at the 95% target. Label both axes and save it as figures/on-time-rate.png.

Open the image and check the labels, units, scale and date range before you use it.

Put the results in a document#

Prompt
Add figures/on-time-rate.png to the Operations section of @monthly-report.docx with a one-sentence caption, and add a table of the last six months from analysis/on-time-delivery.csv. Don't change anything else.

When the agent finishes, choose Inspect changes in the review bar, compare the table with the CSV file, then choose Keep edit or Discard edit. See Word, PowerPoint or Excel and CSV for what to check in each format.

Limits and good habits#

  • Printed output is cut off at about 40,000 characters, so ask for summaries rather than whole tables. Each saved file can be up to about 5 MB.
  • Ask for new file names so a script never writes over your source data.
  • A chart or table is only as good as its data and rules. Check the filters, units and totals against the source before you share the result.
  • For editing a workbook directly, with formulas and formatting, see Excel and CSV.