Skip to content

Commit 734a4d6

Browse files
EricPedleyeddiebergman
authored andcommitted
Changed deprecated DataFrame.append to pd.concat to fix warning (#1487)
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.
1 parent 011fe71 commit 734a4d6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

autosklearn/metalearning/metalearning/meta_base.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@ def add_dataset(self, name, metafeatures):
7373
"Dataset %s already in meta-data. Removing occurence.", name.lower()
7474
)
7575
self.metafeatures.drop(name.lower(), inplace=True)
76-
self.metafeatures = self.metafeatures.append(metafeatures)
77-
78-
runs = pd.Series([], name=name, dtype=float)
79-
for metric in self.algorithm_runs.keys():
80-
self.algorithm_runs[metric].append(runs)
76+
self.metafeatures = pd.concat([self.metafeatures, pd.DataFrame(metafeatures).T])
8177

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

0 commit comments

Comments
 (0)