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即学即用
270
30
Jonathan Drummey
有个很好的建议,就是在与主数据流程分开的分支上使用
Aggregate
(汇总)操作。你可以使用这些
Aggregate
汇总操作步骤来进行计算,将
所有关键数据字段添加到
Group By
(分组)部分时的行数,然后将此值与概况窗格
中每个数据集左上角显示的行数进行比较。如果这些数字不同,就说明有重复的数
据需要处理。
30.3
如何处理重复数据
一旦你知道数据集中存在重复数据,并了解可能的原因,你就可以使用
Prep Builder
去除重复,只留下你想要的记录进行分析。主要有两种方法,你所选择的方法可能
取决于产生重复的原因。
30.3.1
汇总:技巧
1
回到图
30-2
中的数据集,假设你想要每个
Case ID
的最新状态。为了消除重复,你
需要保留每个
Case ID
的最新日期。要做到这一点,请使用
Aggregate
(汇总)操作
步骤,按
Case ID
分组,只返回最大日期(见图
30-6
)。
30
-
6
:使用 Aggregate(汇总)操作步骤来去除重复数据
这一步的结果是只有三行数据,每个
Case ID
只有一行。这里的难点在于,
Prep
Builder
中的汇总操作步骤会删除所有不用作分组或汇总字段的列。要将状态添加到
最新的
Case ID
行(以及任何其他希望添加回来的列),添加一个
Join
(连接)操
271
去除重复数据
作步骤,并将连接条件设置在
Case ID=Case ID
Date=Date
上进行内连接(见图
30-7
)。
如果你以前没有使用过
Join
(连接)
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