#!/usr/local/bin/python
# -*- coding:utf-8 -*-
from pandas import DataFrame,Series
import pandas as pd
import numpy as np
import sys
import matplotlib.pyplot as plt
reload(sys)
sys.setdefaultencoding('utf8')
import json
import time
path='C:UsersTLCBDesktopdata_analyzech02usagov_bitly_data2012-03-16-1331923249.txt'
print path
a= open(path)
print type(a)
print dir(a)
print a.readline()
records=[]
for line in open(path):
#print json.loads(line)
records.append(json.loads(line))
print '--------------------------------'
records = records[:10]
print records
frame=DataFrame(records)
print '------------------------'
print frame['tz']
print frame['tz'].value_counts()