I have a dataframe df
and one of the columns count
is contains strings. These strings are mostly convertable to integers (e.g. 0006
) which is what I will do with them. However some of the entries in count
are blank strings of spaces. How can I
- Drop all the rows where the
count
value is a blank string. - Substitute all the blank values in that column with some numeric value of my choice.
The dataframe is very large if there are particularly efficient ways of doing this.