Skip to content

Commit

Permalink
Fix pandas merge being silly
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-cates committed Jul 5, 2023
1 parent 99890c1 commit 43df354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classification/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ def serialize_data(self):
right_on="IN FILE").dropna()

print("fixed size:", self.samples.shape)

self.samples["original_file_path"] = self.samples[self.config.file_path_col]

if "files" in self.samples.columns:
self.samples[self.config.file_path_col] = self.samples["files"].copy()
if "files_y" in self.samples.columns:
self.samples[self.config.file_path_col] = self.samples["files_y"].copy()

self.samples["original_file_path"] = self.samples[self.config.file_path_col]

self.formatted_csv_file = ".".join(self.csv_file.split(".")[:-1]) + "formatted.csv"
self.samples.to_csv(self.formatted_csv_file)

Expand Down

0 comments on commit 43df354

Please sign in to comment.