Skip to content

Instantly share code, notes, and snippets.

View charlietsai's full-sized avatar

Charlie charlietsai

View GitHub Profile
@charlietsai
charlietsai / pretty_print_df.py
Created November 9, 2016 00:26
Pretty print Pandas DataFrame
from tabulate import tabulate
def pretty_print_df(df):
print tabulate(df, headers='keys', tablefmt='psql')
@charlietsai
charlietsai / tidyR.r
Last active November 7, 2016 22:09
Command line script for reformatting R code using formatR
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
formatR::tidy_source(args[1], file=args[1])