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 Jun 2, 2022
1 parent 25f0be6 commit 0c8f2a0
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 0c8f2a0

Please sign in to comment.