I want to apply this function
df.column.str.split(expand = True)
but the problem is there are some "empty cells", and when I mean "empty" it means that it has, for example, 6 white-spaces. Moreover, this is an iteration, so sometimes I have cells with 2 white-spaces.
How can I identify this "empty cells"?
PD:
df[df.column != '(6 spaces inside)']
works only for a particular case when there are 6 spaces.
EDIT 1: the df.column is an object type with people names (one or more than one, even errors)
EDIT 2: The idea is to remove this cell (row) in order to successfully applied the "str.split" function. This is an interation so sometimes I have cells with 6 spaces and other with 2 spaces.
EDIT 3: I can't remove all whitespaces because then I won't be able to apply the string separation (because I have names like "Jean Carlo" that I want to separate)
FINAL SOLUTION: I could solve the problem with the post that was signaled only adding a '+' because I have whitespaces in other cells.
Solution:
df = df.replace(['^\s+$'], np.nan, regex = True)