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.
我检查了所有超过 5% NULL 值的列。现在我想删除这些列的所有行
代码:
movies = movies.drop(movies[movies.isnull().sum(axis = 'index')/len(movies)*100 > 5],inplace = True) print(movies)
我无法获得预期的输出。
你可以做thresh
thresh
df = df.dropna(axis=1 ,thresh = int(len(df)*0.95))