Spaces:
Runtime error
Runtime error
File size: 311 Bytes
0104e91 | 1 2 3 4 5 6 7 8 9 10 11 12 | """Writing datasets back to disk."""
from pathlib import Path
def save_dataframe(df, path, index=False):
"""Write ``df`` to an Excel file, creating the parent folder if needed."""
path = Path(path)
path.parent.mkdir(parents=True, exist_ok=True)
df.to_excel(path, index=index)
return path
|