from pathlib import Path import pandas as pd output = Path("exports/orders.csv") output.parent.mkdir(parents=True, exist_ok=True)