I have this dataframe boroughCounts
with these sample values:
From To Count
9 None Manhattan 302
10 Bronx Bronx 51
11 Bronx Manhattan 244
12 None Brooklyn 8
13 Bronx Queens 100
14 None None 67
Trying to filter out None
values in "From" and "To" columns using this approach as described here or here:
boroughCounts = boroughCounts[(boroughCounts.From != None) & (boroughCounts.To != None)]
boroughCounts = boroughCounts[(boroughCounts["From"] != None) & (boroughCounts["To"] != None)]
But it doesn't work, and all values remained as is. Am I using it wrong, or is there a better way to do it?