One - One Code All

Blog Content

pandas中dataframe过滤列str.contain出现ValueError: cannot index with vector containing NA/NaN values错误的解决方法

Python 统计学-科学计算   2014-06-04 20:40:41

pandas中dataframe过滤列str.contain出现ValueError: cannot index with vector containing NA/NaN values错误的解决方法


df[df["ticker"].str.contains('0001',case=False, na=False)]

case是False是不区分大小写,而na=False是不是有NaN来填充缺失值。



上一篇:airflow控制task并发度
下一篇:airflow常用命令暂停任务

The minute you think of giving up, think of the reason why you held on so long.