I have downloaded a database table into a csv file.
Now one of the columns has both empty cells and also some of them are written as NULL. Below is the sample dataframe created by reading that CSV file in pandas:
df:
Col1 Col2 Amount1 Amount2
A NULL 100.22 100.22
A NULL 100.22 100.22
A Virgo 100.22 100.22
A Arkenea 100.22 100.22
A 100.22 100.22
A 100.22 100.22
Now when i execute the below code i get the following output:
df[(df['Col1']=="B")].unique()
Output:
('nan', 'Virgo', 'Arkenea')
Here i am not able to differentiate between NULL and empty cells as both are shown as 'nan'. Also if i do fillna, both the NULL and empty columns get updated with the new value. Is there any way i can read the file so that NULL and empty cells are shown separately.
Any leads on this are appreciated.