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[df['colname'] != None]
结果我得到:
KeyError: 'no item named True'
使用dropna():
df.dropna(subset=['colname'])
或者Series.notnull:
df[df['colname'].notnull()]