f1_data.py 文件源码

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

项目:f1_2017 作者: aflaisler 项目源码 文件源码
def mysql_into_df(self):
        # first Extract all the table names
        # connect = self.db_connection
        df_tables = pd.read_sql('show tables;', self.db_connection)
        # store the tables in a dictionary
        d = {}
        col_name = df_tables.columns[0]
        # load individual table into the dictionary
        for table in df_tables[col_name]:
            key = table
            value = pd.read_sql('SELECT * FROM ' + table +
                                ';', self.db_connection)
            d[key] = value
        self.dictTables = d

    # Load qualification table separatedly to infare the timestamp
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号