Gurobi / gurobi-logtools

Extract and visualize information from Gurobi log files
Apache License 2.0
102 stars 16 forks source link

handle warning in newer pandas version #29

Closed mattmilten closed 1 year ago

mattmilten commented 1 year ago

We currently get a warning with newer pandas versions:

grblogtools\helpers.py:47: FutureWarning: Not prepending group keys to the result index of transform-like apply. In the future, the group keys will be included in the index, regardless of whether the applied function returns a like-indexed object.
To preserve the previous behavior, use

    >>> .groupby(..., group_keys=False)

To adopt the future behavior and silence this warning, use 

    >>> .groupby(..., group_keys=True)
  return parameters.groupby("Version").apply(fill_for_version_nosuffix)

I added the suggested group_keys=False to the two affected calls of groupby() to avoid this warning.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

mattmilten commented 1 year ago

@simonbowly, do you have any idea why those checks are failing?

simonbowly commented 1 year ago

They're failing on master as well. It looks like poetry has an issue with isort, and we need to upgrade it: https://github.com/PyCQA/isort/issues/2077

simonbowly commented 1 year ago

Merging #31 should fix the problem here

simonbowly commented 1 year ago

I merged #31 and rebased this. All good now