Skip to content

Commit

Permalink
fixed bug in writing out data
Browse files Browse the repository at this point in the history
  • Loading branch information
fscottfoti committed May 29, 2014
1 parent 063e8e4 commit d460770
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions urbansim/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@ def list_tbls(self):
def save_tmptbl(self, name, tbl):
self.d[name] = tbl

def save_output(self, filename):
outstore = pd.HDFStore(filename, savetbls)
def save_output(self, filename, savetbls=None, debug=False):

if savetbls is None:
savetbls = self.d.keys()

outstore = pd.HDFStore(filename, "w")

for key in savetbls:
df = self.fetch(key)
df = misc.df64bitto32bit(df)
print key + "\n", df.describe()
print key
if debug:
print df.describe()
outstore[key] = df

outstore.close()
Expand Down

0 comments on commit d460770

Please sign in to comment.