Repository: nalepae/pandarallel

Issue:
Add pandas@2.0 to test matrix

Discussion:
codecov[bot]: ## [Codecov](https://codecov.io/gh/nalepae/pandarallel/pull/235?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Manu+NALEPA) Report
> Merging [#235](https://codecov.io/gh/nalepae/pandarallel/pull/235?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Manu+NALEPA) (11886f6) into [master](https://codecov.io/gh/nalepae/pandarallel/commit/b78c63c99a21e479444b7ccd1939222136c2c7fc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Manu+NALEPA) (b78c63c) will **decrease** coverage by `12.59%`.
> The diff coverage is `n/a`.

> :exclamation: Current head 11886f6 differs from pull request most recent head 81c4f9a. Consider uploading reports for the commit 81c4f9a to get more accurate results

```diff
@@             Coverage Diff             @@
##           master     #235       +/-   ##
===========================================
- Coverage   91.37%   78.79%   -12.59%     
===========================================
  Files          12       12               
  Lines         580      580               
===========================================
- Hits          530      457       -73     
- Misses         50      123       +73     
```


[see 9 files with indirect coverage changes](https://codecov.io/gh/nalepae/pandarallel/pull/235/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Manu+NALEPA)

:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Manu+NALEPA)

till-m: Apparently `GroupBy.mutated` is unnecessary since a few versions according to pandas-dev/pandas#51102. Since the tests pass, I propose removing it for all versions and not just specifically pandas 2.0 as suggested by @alexrblohm.

Patch:
diff --git a/pandarallel/data_types/dataframe_groupby.py b/pandarallel/data_types/dataframe_groupby.py
index 9f92797..f2dbb91 100644
--- a/pandarallel/data_types/dataframe_groupby.py
+++ b/pandarallel/data_types/dataframe_groupby.py
@@ -77,7 +77,5 @@ class DataFrameGroupBy:
             mutated = cast(List[bool], mutated)
 
             args = get_args(keys, values, df_groupby)
-
-            return df_groupby._wrap_applied_output(
-                *args, not_indexed_same=df_groupby.mutated or mutated
-            )
+  
+            return df_groupby._wrap_applied_output(*args, not_indexed_same=mutated)


Test patch:
diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml
index ef69e31..f41e14e 100644
--- a/.github/workflows/run_tests.yml
+++ b/.github/workflows/run_tests.yml
@@ -18,12 +18,15 @@ jobs:
         os: ["ubuntu-20.04", "macos-latest", "windows-latest"]
         # Remove Python 3.7.9 on 27 Jun 2023: https://endoflife.date/python
         python-version: ["3.7.9", "3.8.10", "3.9.13", "3.10.8"]
-        pandas-version: ["1.0.5", "1.1.5", "1.2.5", "1.3.5", "1.4.3", ""]
+        pandas-version: ["1.0.5", "1.1.5", "1.2.5", "1.3.5", "1.4.3", "2.0", ""]
 
         exclude:
           # see https://github.com/nalepae/pandarallel/pull/211#issuecomment-1362647674
           - python-version: "3.8.10"
             pandas-version: "1.0.5"
+          # Pandas 2.0 requires Python >= 3.8
+          - python-version: "3.7.9"
+            pandas-version: "2.0"
           # Pandas 1.4.3 requires Python >= 3.8
           - python-version: "3.7.9"
             pandas-version: "1.4.3"