@@ -0,0 +1,1021 @@
+def format_nasdaq(ret,unwanted_keys,exchange) :%0A  import pandas as pd%0A  ret%5B'Exchange'%5D = pd.Series(exchange, index=ret.index)%0A  if unwanted_keys is not None  : %0A    for key in unwanted_keys:%0A      if key in ret.columns.tolist() : ret.drop(key, 1)%0A  temp = ret.to_dict()%0A  if unwanted_keys is not None  : %0A    for key in unwanted_keys:%0A      if key in temp.keys() : del temp%5Bkey%5D%0A  if len(temp.keys()) %3C len(ret.columns.tolist()) :%0A    ret = pd.DataFrame.from_dict(temp)%0A  return ret%0Adef parse_csv(csv) :%0A    import pandas as pd%0A    import io%0A    ret = pd.read_csv(io.BytesIO(csv), encoding='utf8', sep=%22,%22,index_col=%22Symbol%22)%0A    return ret%0Adef get_yahoo_historical(stock,year,strict=True) :%0A    import pandas.io.data as pdd%0A    try :%0A        ret = pdd.DataReader(stock, data_source='yahoo', start='%7B%7D/1/1'.format(year))%0A    except IOError :%0A        return None%0A    if not strict : return ret%0A    first = ret.index.tolist()%5B0%5D%0A    if year != first.year : return None%0A    if 1 != first.month : return None%0A    return ret%0A

Create pandas-util.py