Your screenshot shows use of some method named
isnull, from its name I would guess that it returns a boolean. Should you really be converting that to a float?
float(False) # usually not meaningful
But since it’s pandas and since the variable that the method is called on has a plural name, maybe it’s even something with a shape similar to:
[True, False, False, True, False] # probably no point converting this to float
And if you read your error message, it seems to be saying something similar.
Maybe you mean to count how many are or are not null, that would be a number.
passing values to
str before passing them into str.format seems redundant. str.format already converts to string… that’s what it does. Or part of what it does, anyway… Oh that’s from pandas own code. So weird.