Closed
Description
Currently, grouping by a key that has complex numbers is broken, see the following example
import pandas as pd
df = pd.DataFrame([dict(a=1, b=1 + 1j), dict(a=1, b=1 + 2j)])
df.groupby("b").groups
output:
{1.0: Int64Index([0, 1], dtype='int64')}
expected:
{0: Int64Index([0], dtype='int64'), 1: Int64Index([1], dtype='int64')}
Related #10921