python - 更改其他 DataFrame 中的 DataFrame 行的值?
问题描述
我想更改另一个 DataFrame 列/系列中包含的 DataFrame 的 ros 值。
我有 2 个数据框:
- 方法:
means.columns = Index(['Date', 'a_min', 'a_cierre', 'a_max',
'b_min', 'b_cierre', 'b_max', 'conj'], dtype='object')
- 排:
pai.columns = Index(['mes', 'direccion', 'accion', 'min', 'cierre', 'max', 'Date'],
dtype='object')
下一个代码很适合我的问题:
for x in pai.Date:
means[means.Date==x] = 9999
但我只想把它写在一行中。
解决方案
推荐阅读
- flutter - 使用 pod 依赖项创建 Flutter 插件
- html - 图片标签中的后备图像不起作用
- http - Flutter:默认情况下,Android Pie 会请求应用使用 HTTPS 没有 HTTP 请求
- google-apps-script - 将数据从电子表格复制到另一个和活动单元格
- reactjs - 客户端 React 与 Webpack - 通过参数自定义配置
- javascript - Babel Webpack 错误:您可能需要适当的加载器来处理此文件类型
- python - 如何根据 multiIndex DataFrame 的内部索引执行操作?
- android - 显示 xml 浮点数据
- angular2-nativescript - LazyLoading 路由每次都会在内存中创建新的组件,并且在加载新的相同组件后不会销毁它
- spring-boot - Heroku - 如何监控请求和响应?