Skip to Content
Tableau Prep即学即用
book

Tableau Prep即学即用

by Carl Allchin
August 2022
Beginner to intermediate
463 pages
9h 22m
Chinese
China Electric Power Press Ltd.
Content preview from Tableau Prep即学即用
40
4
Sales
(销售额)和一列标注为
Profit
(收益)的列,就可以让我们在
Desktop
分析数据时,将这两列作为衡量标准。
现在我们已经确定了需要如何塑造数据,让我们看看实际做出这些改变的步骤。
4.3
改变
Prep Builder
中的数据集结构
改变输入数据集的结构有四个关键步骤。
4.3.1 Pivot
(转换)
转换是改变数据结构最重要的一个步骤。有两种类型的转换,如图
4-3
所示。
4
-
3
:列到行的转换(Pivot
1
)和行到列的转换(Pivot
2
转换
1
,从列到行
从多列数据转换为额外的数据行。列头被转换为一个新的维度列,该维度列将包含
所有其他涉及数据转换的列头(见图
4-4
)。
4
-
4
:列到行的转换
塑造数据
41
转换
2
,从行到列
这是列到行的数据转换的逆向操作。在这个数据转换过程中,数据行被转换为
数据集中的附加列(见图
4-5
)。这就要求你既要选择将成为新数据字段标题的
列,又要选择作为新数据字段值的那些数据字段。如果多个值被强行放入同一
个单元格中,你需要选择并对它们应用某种汇总形式。
4
-
5
:行到列的转换
转换操作在第
13
章和第
14
章有更详细的介绍。
4.3.2 Aggregate
(汇总)
汇总步骤是对数值进行求和或求平均值的步骤(见图
4-6
)。汇总不仅改变了数据
行的数量,还可能改变数据的结构。 ...
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

深度学习:核心原理与案例分析

深度学习:核心原理与案例分析

Posts & Telecom Press, Ahmed Menshawy
Python金融实战

Python金融实战

Posts & Telecom Press, Yuxing Yan
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu
HBase管理指南

HBase管理指南

Posts & Telecom Press, Yifeng Jiang

Publisher Resources

ISBN: 9787519864439