您好我有一個像這樣的數據框,有超過500行。找到一個空值,並從一個數據幀中刪除熊貓
company_url company tag_line product data
0 https://angel.co/billguard BillGuard The fastest smartest way to track your spendin... BillGuard is a personal finance security app t... New York City · Financial Services · Security ...
1 https://angel.co/tradesparq Tradesparq The world's largest social network for global ... Tradesparq is Alibaba.com meets LinkedIn. Trad... Shanghai · B2B · Marketplaces · Big Data · Soc...
2 https://angel.co/sidewalk Sidewalk Hoovers (D&B) for the social era Sidewalk helps companies close more sales to s... New York City · Lead Generation · Big Data · S...
3 https://angel.co/pangia Pangia The Internet of Things Platform: Big data mana... We collect and manage data from sensors embedd... San Francisco · SaaS · Clean Technology · Big ...
4 https://angel.co/thinknum Thinknum Financial Data Analysis Thinknum is a powerful web platform to value c... New York City · Enterprise Software · Financia...
我想要做的是,我想要在「數據」列中找到空,並從數據框中刪除該行。我寫了我的代碼,但我相信它沒有按預期工作,因爲行數沒有改變。有人可以幫助我嗎?
我的代碼:
for item in bigdata_comp_dropped.iterrows():
if item[1][4] == "":
bigdata_comp_dropped.drop(item[1])
這個例子TSV沒有任何NaN值在數據列... :( –
下面的兩個解決方案也會比使用更多的速度更快。 – Alexander