feature_engineering_func.py 文件源码

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

项目:quickdraw_prediction_model 作者: keisukeirie 项目源码 文件源码
def load_json(filename):
    '''
    Function:
        - opens json file and store information in a pandas dataframe
        - also prints out aggregated df with counts of picture by countrycode
    Input:
        1. filename/path ex: ./data/filename.json
    Output:
        1. new dataframe containing json info
    '''
    df = pd.read_json(filename, lines=True)
    test = df.groupby(df['countrycode']).count()
    print test.sort(columns='drawing',ascending=False).head(15)
    return df
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号