Skip to content

Address pandas warning about deprecated DataFrameGroupBy.apply default #7235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cirq-core/cirq/experiments/xeb_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _try_keep(k):
else:
groupby_names = ['cycle_depth']

return df.groupby(groupby_names).apply(per_cycle_depth).reset_index()
return df.groupby(groupby_names).apply(per_cycle_depth, include_groups=False).reset_index()


class XEBCharacterizationOptions(ABC):
Expand Down Expand Up @@ -702,7 +702,7 @@ def _per_pair(f1):
groupby = ['layer_i', 'pair_i', 'pair']
else:
groupby = ['pair']
return fidelities_df.groupby(groupby).apply(_per_pair)
return fidelities_df.groupby(groupby).apply(_per_pair, include_groups=False)


def before_and_after_characterization(
Expand Down