Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/19632#discussion_r148370955
--- Diff: examples/src/main/python/pi.py ---
@@ -27,12 +27,16 @@
if __name__ == "__main__":
"""
Usage: pi [partitions]
+
+ Monte Carlo method is used to estimate Pi in the below example.
"""
spark = SparkSession\
.builder\
.appName("PythonPi")\
.getOrCreate()
-
+
+ # If no arguments are passed(i.e. `len(sys.argv) < = 1` )
--- End diff --
This isn't visible to end users, so don't know if this matters. It's
already documented in the usage. I am not sure this meaningfully helps.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]