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即学即用
112
13
Tableau
中有两种类型的转换可以选择:
从列到行的数据转换。
从行到列的数据转换(在第
14
章讨论)。
13.2
如何将列转为行
为了解决日期的问题,我们需要将列的数据改为行的数据。添加
Pivot
(转换)步骤
后,选择
Columns to Rows pivot
(列到行转换)选项,如图
13-3
所示。
13
-
3
:转换选项
等同于在
Excel
中将表
A
转化为表
B
(见图
13-4
)。
13
-
4
:将表 A 转换为表 B 的示例
我们来看看如何在
Prep
中用转换步骤达到这个目的。
1
添加
Pivot
(转换)步骤。数据集中的所有字段(列)将在左侧窗格中列出(见
13-5
)。
113
将列转为行
13
-
5
:数据集中的所有数据字段都会出现在左侧窗格中
2
选择要从数据列到数据行的转换字段。可以使用
Ctrl
键(
Mac
用户可使用
Command
键)选择多个字段。选择字段后,将它们拖动到中间窗格,如图
13-6
所示。
13
-
6
:拖动要转换的日期字段
3
此时应该能在屏幕的右下角看到转换后的数据(见图
13-7
)。
114
13
13
-
7
:查看转换日期字段
4
双击字段名,重新命名数据列,以匹配你的数据(见图
13-8
)。
13
-
8
:重命名概况窗格中的字段
现在,数据已经被重塑,再来做数据的可视化就容易多了。从图 ...
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