You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by srowen <gi...@git.apache.org> on 2017/11/01 20:13:07 UTC
[GitHub] spark pull request #19632: Added description to python spark Pi example
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: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org