In [3]:
import os
import tables
Create and record states based on input value for #cars and #trucks
Close hdf5 file
Create States
In [4]:
a = [{}] * 5
In [5]:
a
Out[5]:
In [7]:
range(12,18)
Out[7]:
In [10]:
for i in range(26,26):
print i
In [25]:
d = {'x':1,'y':2,'z':3}
d['y']
Out[25]:
In [40]:
import pandas as pd
import collections
In [41]:
a = collections.OrderedDict
b = collections.OrderedDict
a['A'] = [1,2,3]
a['B'] = [4,5,6]
a['C'] = [2,3,4]
In [31]:
df_a = pd.DataFrame.from_items( [ ['A',[1,2,3]] , ['B',[4,5,6]], ['C',[2,3,4]] ] )
df_b = pd.DataFrame.from_items( [ ['A',[1,2,4]] , ['B',[4,6,3]], ['D',[2,3,4]] ] )
df_a
Out[31]:
In [34]:
df_b
Out[34]:
In [39]:
pd.merge(df_a,df_b,how='right', on=['A','B'])
Out[39]:
In [ ]: