import pandas as pd
df=pd.DataFrame(record,columns['Title','Category','Headline','Summary','ImgLink','Details'])
df
df.to_csv("page1.csv",encoding='utf-8')
I want to store in this format
But file save in this format
import pandas as pd
df=pd.DataFrame(record,columns['Title','Category','Headline','Summary','ImgLink','Details'])
df
df.to_csv("page1.csv",encoding='utf-8')
I want to store in this format
But file save in this format
The problem with CSV is that it is a text file. To show it as UTF-8, you need to do something different. To open the csv file, don't double click on the csv file.
The following is for Excel 2007: for your version of Excel, it may be slightly different.
You should now see the file as expected.
If you wish to double click on the file, do not save it as CSV. Save it as xlsx using either openpyxl or xlsxwriter.
Alternatively, use LibreOffice Calc as your default for opening CSV files - it goes straight into the LibreOffice Calc equivalent of From Text