Reader small image

You're reading from  Mastering Tableau 2023 - Fourth Edition

Product typeBook
Published inAug 2023
PublisherPackt
ISBN-139781803233765
Edition4th Edition
Right arrow
Author (1)
Marleen Meier
Marleen Meier
author image
Marleen Meier

Marleen Meier is an accomplished analyst and author with a passion for statistics and data. By using traditional methodologies and approaches such as Machine Learning and AI, Marleen is dedicated to driving meaningful insights. Currently working as the APAC Data CoE Lead for ABN AMRO Clearing, Marleen is at the forefront of innovation and implementing data-driven strategies in a global financial environment. She has lived and worked in multiple countries, including Germany, the Netherlands, the USA, and Singapore, allowing her to bring a diverse and global perspective to her work. Through her writing and speaking engagements, she aims to empower individuals and organizations to unlock the full potential of their data assets.
Read more about Marleen Meier

Right arrow

Implementing Python functionality

Just like R, TabPy makes use of the SCRIPT_ functions in Tableau. In the next sections, we will practice working with TabPy and will look at multiple use cases. Tableau calculations using TabPy look very similar to R’s. For TabPy, it is important to add a return statement to the calculated field and notice that arguments are noted with an underscore instead of a dot:

Figure 15.31: Python TabPy syntax

This will be manifested in the next exercises; we will first investigate random number generators.

Random and random normal

Many calculations are easily accessible via the calculated fields, others via the table calculations—and then there are some hidden functions. Hidden because those are not (yet) fully supported or tested; therefore, use them with care. If you tried to find the function Random, for example, you would not be able to. But you can still use the Random() function, as can be seen here:

Figure...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Tableau 2023 - Fourth Edition
Published in: Aug 2023Publisher: PacktISBN-13: 9781803233765

Author (1)

author image
Marleen Meier

Marleen Meier is an accomplished analyst and author with a passion for statistics and data. By using traditional methodologies and approaches such as Machine Learning and AI, Marleen is dedicated to driving meaningful insights. Currently working as the APAC Data CoE Lead for ABN AMRO Clearing, Marleen is at the forefront of innovation and implementing data-driven strategies in a global financial environment. She has lived and worked in multiple countries, including Germany, the Netherlands, the USA, and Singapore, allowing her to bring a diverse and global perspective to her work. Through her writing and speaking engagements, she aims to empower individuals and organizations to unlock the full potential of their data assets.
Read more about Marleen Meier