diff --git a/docs/tutorials/anomaly-detection/tutorial_app.py b/docs/tutorials/anomaly-detection/tutorial_app.py index 38d3b764b..89a4b5080 100644 --- a/docs/tutorials/anomaly-detection/tutorial_app.py +++ b/docs/tutorials/anomaly-detection/tutorial_app.py @@ -110,8 +110,8 @@ def main(): sdf = sdf.apply(lambda result: round(result["value"], 2)).filter( should_alert, metadata=True ) - # .to_topic() does not require reassignment ("in-place" operation), but does no harm - sdf = sdf.to_topic(alerts_topic) + sdf.print() + sdf.to_topic(alerts_topic) app.run() diff --git a/docs/tutorials/purchase-filtering/tutorial_app.py b/docs/tutorials/purchase-filtering/tutorial_app.py index 195afcf7c..302cf0d7f 100644 --- a/docs/tutorials/purchase-filtering/tutorial_app.py +++ b/docs/tutorials/purchase-filtering/tutorial_app.py @@ -99,8 +99,9 @@ def main(): ] sdf["Full Name"] = sdf.apply(get_full_name) sdf = sdf[["Full Name", "Email"]] - # .to_topic() does not require reassignment ("in-place" operation), but does no harm - sdf = sdf.to_topic(customers_qualified_topic) + + sdf.print() + sdf.to_topic(customers_qualified_topic) app.run() diff --git a/docs/tutorials/word-count/tutorial_app.py b/docs/tutorials/word-count/tutorial_app.py index 68a52f0b5..104607689 100644 --- a/docs/tutorials/word-count/tutorial_app.py +++ b/docs/tutorials/word-count/tutorial_app.py @@ -57,10 +57,11 @@ def main(): sdf = app.dataframe(source=ReviewGenerator()) sdf = sdf.apply(tokenize_and_count, expand=True) sdf = sdf.filter(should_skip) - # .to_topic() does not require reassignment ("in-place" operation), but does no harm - sdf = sdf.to_topic( - word_counts_topic, key=lambda word_count_pair: word_count_pair[0] - ) + sdf.print() + sdf.to_topic(word_counts_topic, key=lambda word_count_pair: word_count_pair[0]) + + # Start the application + app.run() # This approach is necessary since we are using a Source