pipeline.py 文件源码

python
阅读 38 收藏 0 点赞 0 评论 0

项目:syracuse_public 作者: dssg 项目源码 文件源码
def get_data(query):
    """
    Pulls data from the db based on the query

    Input
    -----
    query: str
       SQL query from the database

    Output
    ------
    data: DataFrame
       Dump of Query into a DataFrame
    """
    from setup_environment import db_dict
    with setup_environment.connect_to_syracuse_db(**db_dict) as conn:
        data = pd.read_sql_query(query, conn)
    return data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号