fix: use explicit encoding="utf-8" for all file I/O so Windows users avoid cp1252 crashes (#543, #550, #576)
This commit is contained in:
4 files changed
+20
-22
No files matched your search
@@ -8,7 +8,7 @@ SavePathType = Annotated[str, "File path to save data. If None, data is not save
|
||||
|
||||
def save_output(data: pd.DataFrame, tag: str, save_path: SavePathType = None) -> None:
|
||||
if save_path:
|
||||
data.to_csv(save_path)
|
||||
data.to_csv(save_path, encoding="utf-8")
|
||||
print(f"{tag} saved to {save_path}")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user