定位要删除的行

需求:删除指定列中NaN所在行。

如下图,’open‘ 列中有一行为NaN,定位到它,然后删除。

定位:

df[np.isnan(df['open'])].index
# 这样即可定位到所在行的index,然后对该index进行drop操作即可

删除行

df.drop(df[np.isnan(df['open'])].index, inplace=True)

# 直接drop对应indx即可删除该行

最新文章

  1. luogg_java学习_10_异常_反射
  2. springmvc HandlerInterceptoer WebRequestInterceptor MethodInterceptor使用
  3. 开发板支持wifi
  4. ASP.NET 5系列教程(七)完结篇-解读代码
  5. HttpClient实现客户端与服务器的通信
  6. Codeforces Round #365 (Div. 2) A 水
  7. open_clientfd(char* hostname,int port)和open_listenfd(int port)
  8. hdoj 2036 改革春风吹满地
  9. bzoj2337
  10. 通过MyEclipse工具直接操作数据库,执行sql语句,方便快捷
  11. Project 6:上楼梯问题
  12. 单独创建一个Android Test Project 时junit 的配置和使用
  13. 日志模块---logging
  14. HTML与HTML5复习标签汇总
  15. K2签约龙光地产,为集团实现“千亿目标”保驾护航
  16. “XmlDocumentationProvider”不实现接口成员“IDocumentationProvider.GetDocumentation(HttpControllerDescriptor)”错误的解决方案
  17. Centos下软件包管理
  18. 十分钟搞定mac下的phpstorm增加xdebug调试
  19. Linux 搭建Nginx并添加配置 SSL 证书
  20. BZOJ 2190 仪仗队(线性筛欧拉函数)

热门文章

  1. win 7和虚拟机之间ping
  2. Flex远程访问获取数据--HTTPService
  3. [转]OpenMP中的private/firstprivate/lastprivate/threadprivate之间的比较
  4. Storm实战
  5. tomocat解决乱码问题
  6. EJB EJB定义了一组可重用的组件:Enterprise Beans
  7. Flash AS 2.0右键菜单问题
  8. APP接口基础学习一
  9. python3----函数、匿名函数
  10. scrapy 相关