Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的数据框中估算“年龄”的缺失值。这是一个浮动对象。
通过这样做,
我正在尝试在我的代码中执行此操作,但无法使其正常工作。
df['age'].fillna(df.loc[df['age']<12 | df['age']>6, 'age'].mean())
我得到 TypeError 说:无法使用 dtyped [float64] 数组和 [bool] 类型的标量执行 'ror_'
先感谢您!