I have data in the form of nested list. i am converting this data into dataframe. Now i want to convert this dataframe into excel (without storing on local system) and attach/dynamically send mail with this excel file as a attachment
i can download the excel file on local system and then attach to mail and send this mail
but i dont want to store locally it is directly generate and attach to mail and send
data = [['1', 'Ram', 'PL', 'NA', '04/24/19'];['2', 'Dhana', 'PL', 'NA', '04/24/19'],['3', 'Nares', 'A', 'NA', '04/24/19']]
df = pd.DataFrame(data, columns=['ad_id','ename','shift','status','date'])
output
ad_id ename shift status date
0 458435 Ram PL NA 04/24/19
1 471611 Dhana PL NA 04/24/19
2 476934 Naresh A NA 04/24/19
I expect it directly generate the excel file and attach to mail and send