from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import *
from sqlalchemy.dialects.postgresql import *
from sqlalchemy.orm import sessionmaker, load_only
import pandas as pd
import sys, os
if sys.platform == "darwin":
    rootpath = (
        "/Users/bibsian/Desktop/git/database-development/")
    end = "/"

elif sys.platform == "win32":
    rootpath = (
        "C:\\Users\MillerLab\\Desktop\\database-development\\")
    end = "\\"

# Helper Functions to coerce datatypes as necessary
# And replace likely values that indicate null (i.e. -99999)
def find_types(tbl, name):
    ''' Method to get data types from Tbls'''
    dictname = (name + "types")
    dictname = {}
    for i,item in enumerate(tbl.__table__.c):