第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

在 Pandas 的整數(shù)數(shù)據(jù)框中使用 DataFrame.at

在 Pandas 的整數(shù)數(shù)據(jù)框中使用 DataFrame.at

慕勒3428872 2021-08-05 17:49:47
我有以下DataFrame由整數(shù)值組成的內(nèi)容:df = pd.DataFrame(data=1, columns=['a','b'], index=[1,2,3])   a  b1  1  12  1  13  1  1我想在單個單元格上設(shè)置缺失值,當我嘗試時:df.at[1,'a'] = np.nan然后我得到這個異常:Traceback (most recent call last):  File "<input>", line 1, in <module>  File "pandas/core/indexing.py", line 2159, in __setitem__    self.obj._set_value(*key, takeable=self._takeable)  File "pandas/core/frame.py", line 2582, in _set_value    engine.set_value(series._values, index, value)  File "pandas/_libs/index.pyx", line 124, in pandas._libs.index.IndexEngine.set_value  File "pandas/_libs/index.pyx", line 133, in pandas._libs.index.IndexEngine.set_value  File "pandas/_libs/index.pyx", line 570, in pandas._libs.index.convert_scalarValueError: Cannot assign nan to integer series
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 211 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號