Python Forum
ISNULL/NVL alternative in filter - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: ISNULL/NVL alternative in filter (/thread-24452.html)



ISNULL/NVL alternative in filter - SIARO - Feb-14-2020

Hi,
I'm very new in data science and Python,so i'm trying now to learn by playing with the data
i'm trying to select data from data Frame where the containing column data is neither None or NaN or NA
In SQL this will be very simple to do IFNULL(GarageType,"NA") <> "NA" or NVL(GarageType,"NA") <> "NA"
I'm Python i cannot find a similar option ( enclosed example). Can anyone help with a better solution

Quote:c1[(c1["MiscFeature"].isna()) & ((c1["GarageType"] != "NA") & (c1["GarageType"].notna()) )][["MiscFeature","GarageType","CentralAir","Heating","PoolQC"]]

Thank You,