def test_nunique_nested_with_agg_bug(es):
    """Pandas 2.2.0 has a bug where pd.Series.nunique produces columns with
    the category dtype instead of int64 dtype, causing an error when we attempt
    another aggregation"""
    num_unique_feature = AggregationFeature(
        Feature(es["log"].ww["priority_level"]),
        "sessions",
        primitive=NumUnique,
    )

    mean_nunique_feature = AggregationFeature(
        num_unique_feature,
        "customers",
        primitive=Mean,
    )
    feature_set = FeatureSet([mean_nunique_feature])
    calculator = FeatureSetCalculator(es, time_last=None, feature_set=feature_set)
    df = calculator.run(np.array([0]))

    assert df.iloc[0, 0].round(4) == 1.6667
Pandas 2.2.0 has a bug where pd.Series.nunique produces columns with
    the category dtype instead of int64 dtype, causing an error when we attempt
    another aggregation
featuretools/tests/computational_backend/test_feature_set_calculator.py