Skip to content

Commit

Permalink
TST: Add test inconsistency in group by (pandas-dev#44803) (pandas-de…
Browse files Browse the repository at this point in the history
  • Loading branch information
NumberPiOso authored and yehoshuadimarsky committed Jul 13, 2022
1 parent a3af036 commit b3a49b5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pandas/tests/groupby/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@
from pandas.core.groupby.base import maybe_normalize_deprecated_kernels


def test_group_by_copy():
# GH#44803
df = DataFrame(
{
"name": ["Alice", "Bob", "Carl"],
"age": [20, 21, 20],
}
).set_index("name")

grp_by_same_value = df.groupby(["age"]).apply(lambda group: group)
grp_by_copy = df.groupby(["age"]).apply(lambda group: group.copy())
tm.assert_frame_equal(grp_by_same_value, grp_by_copy)


def test_repr():
# GH18203
result = repr(Grouper(key="A", level="B"))
Expand Down

0 comments on commit b3a49b5

Please sign in to comment.