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

Correct DataFrame.replace docs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5.0, 1.6.0, 2.0.0, 2.1.0, 2.2.0
    • 2.2.0
    • Documentation, PySpark, SQL
    • None

    Description

      Current docstring provides incorrect description of to_replace argument:

      If the value is a dict, then `value` is ignored and `to_replace` must be a mapping from column name (string) to replacement value.

      It looks like it has been copied from `na.fill` docs. In fact dict should provide mapping from value to replacement value.

      Moreover docs fail to explain some fundamental limitations (like lack of support for heterogeneous values) and some usage scenarios.

      Attachments

        Issue Links

          Activity

            People

              zero323 Maciej Szymkiewicz
              zero323 Maciej Szymkiewicz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: