SyntaxFix
Write A Post
Hire A Developer
Questions
For a very fast and simple solution where you check equality against a single value, you can use the mask method.
mask
df.mask(df == ' ')