From the course: Data Science Reporting with Quarto for Python
Unlock this course with a free trial
Join today to access over 24,600 courses taught by industry experts.
Inserting calculated values into sentences
From the course: Data Science Reporting with Quarto for Python
Inserting calculated values into sentences
- [Instructor] Data driven sentences are one of the most powerful features of Quarto as a reporting tool. We're in values-into-sentences.qmd in the 04_04b folder. And let's preview this document with command + shift + K. Now that's previewed, we can see a sentence here with T values. We should really insert from our data. The number of values in the penguins dataset and a percentage of the those have NA values. So let's go to our input document here and let's create an inline code chunk, which we do by opening and closing a backtick. Inside of our backticks inline code chunk, we need to specify the language of the code chunk, which in this case is Python. And we're going to use the function len on penguins_df. Let's preview the document again with command + shift + k. And there we can see value from the data has been inserted. Let's also go here and calculate the percentage of the rows have NA values. So we'll open up an inline code chunk, we'll specify the language as Python, and…
Contents
-
-
-
-
-
-
(Locked)
Using Matplotlib and Plotnine in Quarto4m 16s
-
Displaying tables of data in Quarto5m 9s
-
(Locked)
Displaying images in Quarto4m 25s
-
(Locked)
Inserting calculated values into sentences3m 34s
-
(Locked)
Adding captions and cross-references to Quarto8m 35s
-
(Locked)
Challenge: Create a rich Quarto report30s
-
(Locked)
Solution: Create a rich Quarto report8m 39s
-
(Locked)
-
-
-
-