乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      成功解決raise KeyError(f“None of [{key}] are in the [{axis_name}]“)KeyError: “None of [Index([‘a(chǎn)ge.in.y

       處女座的程序猿 2022-06-22 發(fā)布于上海

      成功解決raise KeyError(f"None of [{key}] are in the [{axis_name}]")
      KeyError: "None of [Index(['age.in.years'], dtype='object')] are in the [columns]"


      解決問(wèn)題

      raise KeyError(f"None of [{key}] are in the [{axis_name}]")
      KeyError: "None of [Index(['age.in.years'], dtype='object')] are in the [columns]"

      解決思路

      引發(fā)KeyError (f"沒(méi)有[{key}]]在[{axis_name}]")
      關(guān)鍵字錯(cuò)誤:"None of [Index(['age.in.]]Years '], dtype='object')]在[列]"

      解決方法

      train_score = sc.scorecard_ply(train2woe, card_dict, print_step=0)

      train2woe?
      ? ? ? age.in.years_woe ?... ?status.of.existing.checking.account_woe
      0 ? ? ? ? ? -0.194156 ?... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.614204
      1 ? ? ? ? ? ?0.528844 ?... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.614204
      2 ? ? ? ? ? -0.194156 ?... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?-1.176263
      6 ? ? ? ? ? -0.194156 ?... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?-1.176263
      7 ? ? ? ? ? -0.563689 ?... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.614204

      card_dict?
      35 ?age.in.years ?[-inf,26.0) ? -20.0
      36 ?age.in.years ?[26.0,35.0) ? ?-2.0
      37 ?age.in.years ?[35.0,40.0) ? ?21.0
      38 ?age.in.years ? [40.0,inf) ? ? 7.0,

      輸出數(shù)據(jù)可知,兩個(gè)dataframe的列名不一致導(dǎo)致的問(wèn)題!將兩個(gè)dataframe格式的數(shù)據(jù)的列名一致化即可!

        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶(hù) 評(píng)論公約

        類(lèi)似文章 更多