Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Cannot mask with non-boolean array containing NA / NaN values

# if there are null values (e.g. NaN) values in the column, then the following
# error will show:
# "Cannot mask with non-boolean array containing NA / NaN values"
# setting na=False for the contains() method solves the problem
df['column_name'].str.contains(string_to_be_matched_with, na=False)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Cannot #mask #array #NA #NaN #values
ADD COMMENT
Topic
Name
6+6 =