Skip to content

Commit

Permalink
Changed deprecated DataFrame.append to pd.concat to fix warning (#1487)
Browse files Browse the repository at this point in the history
lso removed a loop that wasn't doing anything. DataFrame.append doesn't operate in place so that second loop wasn't causing any side effects, and it was also just adding empty series anyway. If anyone has any insight about why that was there in the first place that would be nice.
  • Loading branch information
EricPedley authored and eddiebergman committed Aug 18, 2022
1 parent 011fe71 commit 734a4d6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions autosklearn/metalearning/metalearning/meta_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ def add_dataset(self, name, metafeatures):
"Dataset %s already in meta-data. Removing occurence.", name.lower()
)
self.metafeatures.drop(name.lower(), inplace=True)
self.metafeatures = self.metafeatures.append(metafeatures)

runs = pd.Series([], name=name, dtype=float)
for metric in self.algorithm_runs.keys():
self.algorithm_runs[metric].append(runs)
self.metafeatures = pd.concat([self.metafeatures, pd.DataFrame(metafeatures).T])

def get_runs(self, dataset_name, performance_measure=None):
"""Return a list of all runs for a dataset."""
Expand Down

0 comments on commit 734a4d6

Please # to comment.