1. Removes first 16 lines

  2. Removes leading spaces in every cell

  3. Replaces the following headers:

    交易时间date 交易对方payee 商品notes 金额(元)amount

  4. Converts date column to actual date format

  5. Removes “¥” from amount and converts to number format

  6. If 收/支 column is “支出”, then amount is multiplied by -1

  7. If notes == "/", copy 交易类型 into 商品

  8. Returns the following columns: date, payee, notes, amount

Understanding WeChat Balance

Transactions are debited and credited to various payment sources, including WeChat Wallet and your linked bank account. It’s not immediately clear which transactions are deducted from which source.

Largely, 支付方式 column tells us where the payment source is. If it says “零钱” or “/”, then it will debit / credit from WeChat Wallet. However, transfers between WeChat Wallet and your bank account might show up under your bank account’s name, ie “建设银行(xxxx)”, so those should also be considered. You should look under the “当前状态” column, and find “提现已到账”. Those transactions should also be debited / credited from the WeChat balance.