LabelEncoding时的SetttingWithCopyWarning

时间:2019-03-25 18:45:01

标签: python pandas

我一直在尝试对数据的单列进行标签编码时收到 CountDownTimer(long millisInFuture, long countDownInterval) // Example : I've set countdown for 30 seconds CountDownTimer countDownTimer = new CountDownTimer(30000, 1000) { public void onTick(long millisUntilFinished) { text_view.setText(millisUntilFinished / 1000 + " " + "Sec"); } public void onFinish() { // implement your code customization here after interval is over text_view.setText("time over!"); } }.start(); 。这是我的代码:

SettingWithCopyWarning

我修改了最后一行以使用X = df[['age', 'population']] labelencoder = LabelEncoder() X['age'] = labelencoder.fit_transform(X['age']) .loc执行相同的操作,但是我仍然收到相同的警告。我相信我可能正在做连锁分配,但我对这个概念的理解不足以解决警告。任何帮助将不胜感激,谢谢!

0 个答案:

没有答案