Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Tableau 2023

You're reading from   Mastering Tableau 2023 Implement advanced business intelligence techniques, analytics, and machine learning models with Tableau

Arrow left icon
Product type Paperback
Published in Aug 2023
Publisher Packt
ISBN-13 9781803233765
Length 684 pages
Edition 4th Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Marleen Meier Marleen Meier
Author Profile Icon Marleen Meier
Marleen Meier
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Reviewing the Basics 2. Getting Your Data Ready FREE CHAPTER 3. Using Tableau Prep Builder 4. Learning about Joins, Blends, and Data Structures 5. Introducing Table Calculations 6. Utilizing OData, Data Densification, Big Data, and Google BigQuery 7. Practicing Level of Detail Calculations 8. Going Beyond the Basics 9. Working with Maps 10. Presenting with Tableau 11. Designing Dashboards and Best Practices for Visualizations 12. Leveraging Advanced Analytics 13. Improving Performance 14. Exploring Tableau Server and Tableau Cloud 15. Integrating Programming Languages 16. Developing Data Governance Practices 17. Other Books You May Enjoy
18. Index

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 chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime