Skip to content

Instantly share code, notes, and snippets.

Avatar

Josh D kaiwei

  • Vancouver, BC
View GitHub Profile
@kaiwei
kaiwei / blogpost.py
Created Jul 1, 2016 — forked from josiahwiebe/blogpost.py
Post from Editorial to Jekyll on GitHub Pages
View blogpost.py
#coding: utf-8
import keychain
import console
import editor
import time
import re
import requests
import json
View keybase.md

Keybase proof

I hereby claim:

  • I am kaiwei on github.
  • I am kaiwei (https://keybase.io/kaiwei) on keybase.
  • I have a public key ASBs0Eq64ftoeLcc765A_EgHW9ybVPuBuiFHMuetwXFjtgo

To claim this, I am signing this object:

@kaiwei
kaiwei / scb_cc_stmt_cleaner.py
Created Jun 12, 2020
Standard Chartered Bank Singapore Credit Card CSV download cleaner
View scb_cc_stmt_cleaner.py
import pandas as pd
import numpy as np
import sys
# Create a Dataframe from CSV
df = pd.read_csv(sys.argv[1], thousands = ',', delimiter = ',', skiprows = 4, low_memory = False, keep_default_na = False)
# Cleaning: (1) Drop "Unposted" (2) Remove nonsense entries at the bottom (3) Remove "SG" from all Desc
df.Date = df.Date.str.strip()
df = df[~df.DESCRIPTION.str.contains("UNPOSTED")]
@kaiwei
kaiwei / scb_bank_stmt_cleaner.py
Created Jun 12, 2020
Standard Chartered Bank Singapore Bank CSV download cleaner
View scb_bank_stmt_cleaner.py
import pandas as pd
import numpy as np
import sys
# Create a Dataframe from CSV
df = pd.read_csv(sys.argv[1], thousands = ',', delimiter = ',', skiprows = 5, low_memory = False, keep_default_na = False)
# Cleaning: (1) Tabs in columns and headers (2) Make numbers into numbers instead of strings
df.columns = df.columns.str.strip()
df.Date = df.Date.str.strip()
You can’t perform that action at this time.