Follow my attempts. And still unsuccessful.
import pandas as pd
def data_frame():
return pd.DataFrame([{'link': 'http://brito.blog.incolume.com.br', 'title':'Blog'}{'link':'http://google.com', 'title':'Pesquisa'}])
def toExcel0():
df = data_frame()
df.to_excel('{}.xlsx'.format(os.path.basename(__file__).split('.')[0]), sheet_name='Sheet1')
def toExcel1():
df = data_frame()
xslx = pd.ExcelWriter('{}.xlsx'.format(os.path.basename(__file__).split('.')[0]), engine='xlsxwriter')
df.to_excel(xslx, sheet_name='Sheet2', index=False)
xslx.save()
def toExcel2():
df = data_frame()
with pd.ExcelWriter('{}.xlsx'.format(os.path.basename(__file__).split('.')[0])) as xlsx:
df.to_excel(xlsx, 'Sheet5')
def toExcel():
df = data_frame()
xsls = pd.ExcelWriter('{}.xlsx'.format(os.path.basename(__file__).split('.')[0]))
df.to_excel(xsls, sheet_name='Sheet3')
df.to_excel(xsls, sheet_name='Sheet4')
xsls.save()
xsls.close()