Skip to content

Pandas FutureWarning Cluttering output #408

@jaclark5

Description

@jaclark5

Pandas FutureWarnings are cluttering output:

[alchemlyb/src/alchemlyb/estimators/bar_.py:100](alchemlyb/src/alchemlyb/estimators/bar_.py:100): FutureWarning: When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.
  (len(groups.get_group(i)) if i in groups.groups else 0)
[alchemlyb/src/alchemlyb/estimators/bar_.py:122](alchemlyb/src/alchemlyb/estimators/bar_.py:122): FutureWarning: When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.
  uk = groups.get_group(self._states_[k])
[alchemlyb/src/alchemlyb/estimators/bar_.py:127](alchemlyb/src/alchemlyb/estimators/bar_.py:127): FutureWarning: When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.
  uk1 = groups.get_group(self._states_[k + 1])

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions