to_dict 作用DataFrame 默認orient=‘dict’
參數’dict’, ‘list’, ‘series’, ‘split’, ‘records’, ‘index’
""" to_dict 作用DataFrame 默認orient='dict' 參數'dict', 'list', 'series', 'split', 'records', 'index' """
print(df.to_dict()) # df.to_dict('dict')
''' {'id': {0: 1, 1: 2, 2: 3, 3: 4, 4: 5}, 'name': {0: 'amy', 1: &