
成果範例
Merging the monthly sales files of 9 shops into one Excel report
How it is run
python merge_sales.py --month 2026-10
2026-11-02 09:14:03 INFO Folder: sales/2026-10, 9 files found
2026-11-02 09:14:03 INFO shop-01.csv: 1,284 rows
2026-11-02 09:14:04 INFO shop-02.xlsx: 967 rows
2026-11-02 09:14:04 WARN shop-07.csv: 3 rows without a price skipped (lines 88, 412, 913)
2026-11-02 09:14:05 INFO Done: 10,412 rows -> report-2026-10.xlsx (sheets "Sales" and "Totals")
Settings, not code
The column names of each shop live in settings.ini, so a new shop or a renamed column is a line there:
[columns]
date = Date, Sale date, Day
product = Product, Item, Name
quantity = Qty, Quantity, Pcs
price = Price, Unit price
A part of the code
def read_shop_file(path: Path, columns: dict[str, list[str]]) -> pd.DataFrame:
"""Reads one shop's file and gives it the report's column names."""
table = pd.read_excel(path) if path.suffix == ".xlsx" else pd.read_csv(path, encoding="utf-8-sig")
renamed = {}
for name, variants in columns.items():
found = next((c for c in table.columns if c.strip() in variants), None)
if found is None:
raise ReportError(f"{path.name}: no column for '{name}' (looked for {', '.join(variants)})")
renamed[found] = name
table = table.rename(columns=renamed)[list(columns)]
table["shop"] = path.stem
return table
Files: a ZIP archive with merge_sales.py (310 lines), settings.ini, requirements.txt and a README with installing Python, running the script and what each message in the log means. The client runs it on their own computer.
Client: a small chain of 9 stationery shops; each shop sends its sales for the month as a CSV or Excel file, with slightly different column names. Task: one script that reads every file in a folder, brings the columns to one shape, and writes a single Excel report with all sales and a sheet of totals by shop.
客戶與所有細節皆為虛構。
關於此服務
sitemap.xml 會告訴搜尋引擎您的網站有哪些頁面。許多商店架站工具和網站平台都已經會產生一份,所以請先檢查您的網站;這個腳本適用於手工打造或較舊的網站,或您現有的 sitemap 列了已經失效的頁面。它從首頁開始,以和緩的速度追蹤您自己的連結,只保留能正常開啟的頁面:沒有錯誤、沒有轉址、沒有帶追蹤參數的重複網址;標準版起,也排除標記為 noindex 的頁面。它依 sitemaps.org 的規範寫出 sitemap.xml,進階版會把大型網站分成多個檔案並附上索引檔。檔案由您自己上傳到網站,並加到 Google Search Console 中。Sitemap 有助於頁面被找到;但不保證收錄或排名。
包含內容
- 您會得到一個 ZIP 壓縮檔,內含 Python 腳本、附逐步說明的 README,標準版起另附記錄區塊和限制的設定檔;訂單頁面上也會顯示程式碼。
- 只收錄正常頁面沒有錯誤、轉址或重複網址
- 符合標準依 sitemaps.org 說明的 sitemap.xml 格式
- 排除指定區塊搜尋、購物車、篩選頁,或您指定的任何部分
- 和緩的速度頁面之間有間隔,不會加重網站負擔
- 易讀的程式碼附有註解,日後很容易修改規則
服務流程
- 1任務您提供網站網址和要排除的部分
- 2程式碼我們撰寫腳本和執行說明
- 3試跑您執行腳本、檢查頁面清單,再上傳檔案
- 4修改您在方案範圍內提出修改,並附上任何錯誤訊息
需要您提供的資料
您網站的網址、大約有多少頁面、用什麼平台架設(如果您知道),以及是否已有 sitemap。要排除的區塊和網址類型,例如搜尋結果、篩選頁、購物車,或帶有 ?sort= 的網址。網站是否有多種語言或子網域。您的系統:Windows、macOS 或 Linux。
我們會詢問您:
- 您網站的網址是什麼?
- 網站已經有 sitemap 了嗎?
- 要排除哪些部分?
比較方案
付款保障
下單時付款,但只有在驗收成果後,款項才會撥付。
- 固定價格付款後,方案價格不會變動。
- 款項先行保留付款時,金額只會先保留,在您驗收後才會撥付給服務。
- 交付前檢查每份成果在交到您手上之前都會經過品質檢查,您也可以在驗收前於訂單頁面查看成果。
- 免費修改在需求說明範圍內,可依方案允許的次數提出修改。
- 3 天後自動驗收若您在交付後 3 天內未驗收也未提出修改,成果將自動驗收。若您在交付後於訂單聊天室留言,訂單會暫停自動驗收;我們回覆後,可能會重新起算 3 天,並會在聊天室中告知。
- 重新製作或全額退款若成果不符合您的需求說明且修改後仍未改善,或製作時間超過交付期限的兩倍,請在訂單聊天室留言:我們將重新製作,或全額退還款項。
常見問題
這樣我的頁面就會出現在 Google 上嗎?
Sitemap 有助於搜尋引擎找到您的頁面,但收錄哪些頁面、如何排名,由搜尋引擎決定。我們不保證收錄、流量或排名。
它會自己更新 sitemap 嗎?
每次執行時,它都會寫出一份新的 sitemap。進階版另附排程執行的說明,例如每週在您的伺服器上執行一次,並把檔案複製到正確位置。
它看得到沒有任何連結指向的頁面嗎?
看不到,它就像訪客一樣,靠追蹤連結來找頁面。沒有連結指向的頁面,可以透過您在設定中提供的清單加入。
你們會幫我上傳到網站嗎?
不會。我們絕不登入您的網站或主機空間。README 會說明如何上傳 sitemap.xml,以及如何把它加到 Google Search Console。
沒有找到您要的答案?