I have a dataframe like so:
RANK COUNT
'2020-01-01' 100 -1
'2020-01-02' 50 -1
'2020-01-03' -1 75
How can I replace all occurrences of -1
with None
and still preserve both the RANK
and COUNT
as ints?
The result should look like:
RANK COUNT
'2020-01-01' 100
'2020-01-02' 50
'2020-01-03' 75
If this isn't possible, how can I dump the original data into a .csv file that looks like the desired result?