I have a pandas framework with boolean values, i.e.
col1 col2
1 True False
2 False True
3 True True
when i use the pandas' method DataFrame.to_csv, the resulting framework looks like
,col1,col2
1,True,False
2,False,True
3,True,True
Is there a way to write boolean variables as 1s and 0s (more economical in area), i.e.
,col1,col2
1,1,0
2,0,1
3,1,1
don't you need to pour the entire data frame first?
source
share