amphibian-dev / toad

ESC Team's credit scorecard tools.
https://toad.readthedocs.io
MIT License
474 stars 173 forks source link

transer.export 报错 TypeError: keys must be str, int, float, bool or None, not int64 #104

Open zero-jack opened 1 year ago

zero-jack commented 1 year ago

transer.export()

结果

{'age': {0: -0.5748539167255243,
  1: -0.4233620518446515,
  2: -0.15619161759134859,
  3: 0.02616871096148058,
  4: 0.2630219948460108,
  5: 0.21529928528911702},
 'fst_invt_long': {0: -0.7836159380763321,
  1: 0.06219933550747941,
  2: 0.5781919504643861},
 'lst_invt_long': {0: 0.8183783026219483,
  1: -0.20047266180503706,
  2: -1.125672723795272},
 'l1y_tot_invt_amt': {0: -1.3657817883945709,
  1: -0.427339380408572,
  2: 0.22335591634347757,
  3: 0.998910829369087,
  4: 0.8238807119557291},
 'l6m_sub_invt_amt': {0: 0.14352366427980245,
  1: -0.6950809929843871,
  2: -0.37467043587516324,
  3: 0.6245947678287735},
 'is_plan': {0: -0.5176030885079691, 1: 1.3639561236586857},
 'l1m_lst_date_wins': {0: -0.7839553950379705,
  1: -0.47602908677758665,
  2: 0.45042263567293467,
  3: 1.2450903666267443},
 'lst_leiji_rate': {0: -0.7863610811190417,
  1: -0.08327534425550503,
  2: 0.45185866148568427},
 'INCREASE_1MON': {0: -0.1338245966676937, 1: 0.2960018282969318},
 'INCREASE_1YEAR': {0: -0.18023615649637223,
  1: -0.27798182108109193,
  2: 0.35161431666146487},
 'ranking': {0: 0.42396113678432584,
  1: 0.19430120550898083,
  2: -0.0018323756564017789,
  3: -0.24153746931932132,
  4: -0.4911537199221026,
  5: -1.4973659895796683},
 'MNG_LABEL_NAME': {0: -1.9064680676253056, 1: 0.10544692336479297}}

但`transer.export(to_json = 't.json')` 会报错,怎么解决?
Secbone commented 1 year ago

@zero-jack 哪个版本?

zero-jack commented 1 year ago

@Secbone 0.1.0