Reputation: 2529
I have a dataframe, some of the cell in the dataframe have 0 , how to replace all the 0 with ' ' ?
final = final.replace(0, '')
This code not able run...Anyone can share me idea?
Upvotes: 2
Views: 21282
Reputation: 862801
I think you need:
final = final.replace(0, np.nan)
.style.apply(color, axis=None)
.set_table_attributes('border="" class = "dataframe table table-hover table-bordered"')
.set_precision(10)
.render()
Upvotes: 5