# index
# index1 = table.cols.date.create_index()

# read the first couple of rows (like df.head)

"""
Explanation: before indexing of columns:
ls -lt ~/gscratch/symbol_count/agg_count.h5
-rw-r--r-- 1 ryee ucb 139474786 Jul 26 10:32 /global/home/users/ryee/gscratch/symbol_count/agg_count.h5
End of explanation
"""


tbf = tb.open_file("/global/scratch/ryee/symbol_count/agg_count.h5", "a")
table = tbf.root.count_table.read()

table['count'].sum()

"""
Explanation: naive:  read all the data into memory
End of explanation
"""


df = DataFrame(table)
df.head()

df["count"].sum()

cdf = DataFrame(df["date"].value_counts(), columns=['c'])
cdf['ts']= cdf.index
cdf.head()

%matplotlib inline

cdf.plot(x='ts', y='c', kind='scatter')

"""
Explanation: even use pandas
End of explanation
"""


