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

Incorrect annotations in SeriesGroupBy._cleanup_and_return

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.2.1, 3.3.0
    • PySpark
    • None

    Description

      SeriesGroupBy._cleanup_and_return annotations

          def _cleanup_and_return(self, pdf: pd.DataFrame) -> Series:
              return first_series(pdf).rename().rename(self._psser.name)
      

      are inconsistent:

      • If pdf is pd.DataFrame then output should be pd.Series.
      • If output is ps.Series then pdf should be ps.DataFrame.

      Doesn't seem like the method is used (it is possible that my search skills and PyCharm inspection failed), so I am not sure which of these options was intended.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: