fix: incorrect data copying

This commit is contained in:
2026-01-31 15:29:53 +00:00
parent 65521b3cce
commit 445cfbdf96

View File

@@ -27,7 +27,7 @@ class StatGen:
comments_df["parent_id"] = comments_df.get("post_id") comments_df["parent_id"] = comments_df.get("post_id")
self.df = pd.concat([posts_df, comments_df]) self.df = pd.concat([posts_df, comments_df])
self.original_df = self.df self.original_df = self.df.copy(deep=True)
self._add_date_cols(self.df) self._add_date_cols(self.df)
## Private Methods ## Private Methods
@@ -96,4 +96,4 @@ class StatGen:
return self.df return self.df
def reset_dataset(self) -> None: def reset_dataset(self) -> None:
self.df = self.original_df self.df = self.original_df.copy(deep=True)