I want to find the unique elements in a column of a dataframe which have missing values. i tried this: df[Column_name].unique()
but it returns nan as one of the elements. what can i do to just ignore the missing values.
dataframe look like this.click here
Python – Ignoring NaN in a DataFrame with Pandas
dataframenumpypandaspython
Best Answer
Try calling
.dropna()
right before your call to.unique()
. A working example: