Skip to content

Commit

Permalink
Fixing sqlite error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Dec 23, 2015
1 parent afae892 commit 0f892c6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions panoramix/data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import pandas as pd
import csv
from datetime import datetime
import csv
import gzip
import json
import os
from panoramix import app, db, models
from sqlalchemy import Column, String, DateTime, Table, Integer

from flask.ext.appbuilder import Base
import pandas as pd
from sqlalchemy import Column, String, DateTime, Table, Integer

from panoramix import app, db, models

config = app.config

Expand Down Expand Up @@ -40,6 +43,7 @@ def load_world_bank_health_n_pop():
"""
with gzip.open(os.path.join(DATA_FOLDER, 'countries.json.gz')) as f:
pdf = pd.read_json(f)
pdf.year = pd.to_datetime(pdf.year)
pdf.to_sql(
'wb_health_population',
db.engine,
Expand Down

0 comments on commit 0f892c6

Please sign in to comment.