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即学即用
146
17
联合数据
大多数与数据打交道的软件都要求将数据整合形成单一的数据表来工作。然而,这
个世界往往不是那么简单,所以常常要把很多张数据表拉到一起,才能建立那个单
一的数据表。
Unioning
(联合)是一种数据准备技术,它将帮助你完成这项任务。
17.1
什么是
union
(联合)
可以认为联合操作是将一个数据集堆叠在另一个数据集之上。作为数据准备过程的
一部分,包含相同内容的列应该被联合。正如你很快就会看到的,这要求数据结构
非常相似。
让我们来看两个独立的数据集示例。
York
(约克)商店的销售情况(见图
17-1
)和
Leeds
(利兹)商店的销售情况(见图
17-2
)。
17
-
1
York(约克)商店销售额数据集
147
联合数据
17
-
2
Leeds(利兹)商店销售额数据集
将这两张表联合起来,可以去除额外的列头,并将数据行堆叠在一起(见图
17-
3
)。
17
-
3
York 商店和 Leeds 商店数据集的联合结果
通常联合取决于数据字段是否满足以下条件:
每个数据集的名称是否相同。具有相同名称的列的内容将在生成的数据集中堆
叠在该列名称下的数据行中。目前,
Prep Builder
只允许这种类型的联合。
以相同的顺序定位。第一列的内容将堆叠在其他数据集中第一列的内容之上,
无论它包含什么内容。 ...
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