Skip to Content
学习 Excel 生成式人工智能工具 (Chinese Edition)
book

学习 Excel 生成式人工智能工具 (Chinese Edition)

by Angelica Lo Duca
April 2026
Intermediate
390 pages
5h 31m
Chinese
O'Reilly Media, Inc.
Content preview from 学习 Excel 生成式人工智能工具 (Chinese Edition)

第 9 章. 使用 Copilot进行数据 分析

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

去年夏天,我和家人去乡下采摘黑莓。我们每年都会这样做:直接从灌木丛上摘一些来吃,剩下的则带回家。有一次我甚至尝试做果酱,不过我得承认那次并不太成功

采摘时,我突然意识到一件事:我并没有把看到的每一颗莓果都摘下来。我是有选择性的,只摘最饱满、最成熟的那些。就在那一刻,我灵光一闪:数据分析其实很像采摘莓果。你不会使用每一条数据;你会专注于最好的数据,即数据集中那些能带来有意义洞察的部分。

不妨将灌木丛想象成一张包含多列的表格。浆果就像是你关注的列。诀窍在于筛选,在于选择关注哪些数据,从而让重要的信号从噪声中脱颖而出。这正是本章要探讨构建数据透视表(PivotTables)技巧的原因,这正是将成熟的浆果与其他浆果区分开来的方法。

但这还不是全部。当你在田间劳作时,会发现有些浆果尚未成熟;你需要过一两天再来采摘。数据也是如此。有时,答案并不会直接体现在原始数字中。 通过“假设分析”,你可以模拟各种情景,并观察当某些条件发生变化时,结果会如何改变。

当然,单凭一章内容无法涵盖 Excel 提供的所有数据分析技术。 我的目标是为您打下基础,建立一种思考和操作 Copilot 的方法,供您在此基础上进行拓展,并适应您自身的需求和数据集。

本章内容包括:

  • 高级数据透视表

  • 假设分析

  • 数据分析的泛化

让我们从高级数据透视表开始。

高级数据透视表

Excel 中的高级数据透视表是用于探索和分析大型数据集的最强大的工具之一。与简单的汇总不同,数据透视表允许用户动态重新排列数据字段,并即时改变视角,而无需更改底层数据集。

第 5 章中,您已学习了如何使用 Copilot 在 Excel 中构建数据透视表。 简单回顾一下,您可以通过基于叙事的策略来构建 Copilot 的 prompt:背景、要点和操作。更准确地说,prompt 的结构如下:

背景

指定数据集或关注点(例如,“考虑MainTable表”)。

要点

描述您希望进行的分析或汇总(例如,“按类别划分的总收入)。

操作

添加您希望结果如何显示或调整(例如,“降序排序)。

prompt的第三部分(操作)是可选的,如果您不需要特定格式,可以省略该部分。

在本章中,为了演示目的,我们将 使用一个代表一年内收集的餐厅订单的数据集。 该数据集可在本书的 GitHub 仓库中获取: 09/restaurant_orders.xlsx

该数据集包含以下字段:

订单编号

每条订单行的唯一标识符(例如,ORD10001)

订单日期

订单下单日期(YYYY-MM-DD)

菜品

所点菜品的名称(例如,提拉米苏、玛格丽特披萨)

类别

菜品类别,例如开胃菜、主菜、第二道菜、甜点、饮料或品鉴菜单

单价

该菜品的单份价格(单位:美元)。包含因通货膨胀和促销活动导致的变动

数量

该订单行中该菜品的订购份数

服务员

接单服务员的姓名(例如:卢卡、安娜、约翰)

餐桌

该订单对应的桌号(1至20),适用于堂食服务

支付方式

账单支付方式,现金或刷卡

渠道

销售渠道:堂食、外带或外送

收入

计算字段:单价 × 数量,代表该订单行的总金额

订单年份(例如:2023 或 2024)

订单月份,以1至12的数字表示;适用于基于时间的分析

图 9-1展示了该数据集的屏幕截图。

图 9-1. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

向量数据库 (Chinese Edition)

向量数据库 (Chinese Edition)

Nitin Borwankar

Publisher Resources

ISBN: 0642572371579