Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-10380

Confusing examples in pyspark SQL docs

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: Documentation, SQL
    • Labels:

      Description

      There’s an error in the astype() documentation, as it uses cast instead of astype. It should probably include a mention that astype is an alias for cast (and vice versa in the cast documentation): https://spark.apache.org/docs/latest/api/python/pyspark.sql.html#pyspark.sql.Column.astype

      The same error occurs with drop_duplicates and dropDuplicates: https://spark.apache.org/docs/latest/api/python/pyspark.sql.html#pyspark.sql.DataFrame.drop_duplicates

      The issue here is we are copying the code. According to Davies Liu the easiest way is to copy the method and just add new docs.

        Attachments

          Activity

            People

            • Assignee:
              rxin Reynold Xin
              Reporter:
              marmbrus Michael Armbrust
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: