#!/usr/bin/env python
# -*- coding: utf-8 -*-
def fix_str(value):
    try:
        return unicode(value)
    except UnicodeDecodeError:
        return unicode(value.decode('latin1'))


def pandas_to_dict(df):
    return [{colname: (fix_str(row[i]) if type(row[i]) is str else row[i])
             for i, colname in enumerate(df.columns)}
            for row in df.values]

@@ -43,16 +43,41 @@
 -*-%0A
+from pandas import tslib%0A
 def fix_
 str(
@@ -72,18 +72,21 @@
 def fix_
-st
+rende
 r(value)
@@ -87,16 +87,47 @@
 value):%0A
+    if type(value) is str:%0A    
     try:
@@ -127,16 +127,20 @@
    try:%0A
+    
         
@@ -161,16 +161,20 @@
 (value)%0A
+    
     exce
@@ -196,32 +196,36 @@
 eError:%0A        
+    
 return unicode(v
@@ -247,16 +247,125 @@
 tin1'))%0A
+    elif type(value) is tslib.Timestamp:%0A        return value.strftime(%22%25Y-%25m-%25d %25H:%25M:%25S%22)%0A    return value%0A
 %0A%0Adef pa
@@ -408,53 +408,19 @@
 me: 
-(
 fix_
-str(row%5Bi%5D) if type(row%5Bi%5D) is str else 
+render(
 row%5B

Fix date format on fix render