I have a data frame where few of columns have mixed type values string + float and when I'm writing them to_excel getting this notification after writing in excel enter image description here
this is the dataframe
df = placementsummaryfinalnew.loc[:,["Placement# Name","PRODUCT","Engagements Rate",
"Viewer CTR","Engager CTR","Viewer VCR",
"Engager VCR","Interaction Rate","Active Time Spent"]]
I tried to convert them by using few of lines
placementvdxsummaryfirst["Viewer VCR"] = placementvdxsummaryfirst["Viewer VCR"].astype(object)
its not working
then I tried this one.
placementvdxsummaryfirst["Viewer VCR"] = placementvdxsummaryfirst["Viewer VCR"].astype(float)
its giving error
then I tried this one.
placementvdxsummaryfirst['Viewer VCR'] = pd.to_numeric(placementvdxsummaryfirst['Viewer VCR'],errors='coerce')
its working but its replacing the "N/A" values with blanks which I don't want.
Kindly help.