Skip to content

Incompatability with Pandas > 1.5.0 #118

@CCBeard

Description

@CCBeard

I believe the source code of SHERPA uses pandas.dataframe.append a couple of times. The pandas.dataframe.append method is deprecated in version 2.0 or higher, and this currently raises and attribute error. I found an easy workaround by amending two lines of code in core.py:

Original:
self.results = self.results.append(pandas.DataFrame.from_dict(row), ignore_index=True)
Modification:
self.results = pandas.concat([self.results, pandas.DataFrame.from_dict(row)], ignore_index=True)
And in one other spot:

Original:
self.results = self.results.append(best_row, ignore_index=True)
Modification:
self.results = pandas.concat([self.results, best_row], ignore_index=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions