Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14830#discussion_r101256136
  
    --- Diff: examples/src/main/python/ml/count_vectorizer_example.py ---
    @@ -17,23 +17,26 @@
     
     from __future__ import print_function
     
    -from pyspark.sql import SparkSession
     # $example on$
     from pyspark.ml.feature import CountVectorizer
     # $example off$
    +from pyspark.sql import SparkSession
    +
     
     if __name__ == "__main__":
    -    spark = SparkSession\
    -        .builder\
    -        .appName("CountVectorizerExample")\
    -        .getOrCreate()
    +    spark = (SparkSession
    +             .builder
    +             .appName("CountVectorizerExample")
    +             .getOrCreate())
     
         # $example on$
         # Input data: Each row is a bag of words with a ID.
    -    df = spark.createDataFrame([
    -        (0, "a b c".split(" ")),
    -        (1, "a b b c a".split(" "))
    -    ], ["id", "words"])
    +    df = spark.createDataFrame(
    +        [
    +            (0, "a b c".split(" ")),
    +            (1, "a b b c a".split(" "))
    +        ],
    --- End diff --
    
    Could you double check if it really does not follow pep8? I have seen the 
removed syntax more often (e.g., `numpy`).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to