0

I have a dataframe as

df=pd.DataFrame(list(v.items()),columns=["Associate","Dailycount"])

where v=r.value_counts() -v is the count of each associate

r=pd.Series(Associates) -r is the series of names of associates

Output of df is-

Associate | Dailycount
----------------------
Associate1 | 14
Associate2 | 5
Associate3 | 31
Associate4 | 4

Now, I want to write the count of each Associate to an excel sheet which is in a format as-

| Date____ | Associate1 | Associate2 | Associate3 | Associate4
-----------------------------------------------
9/19/2017  | 3_________ | 20________ | 16________ | 4__________|
9/20/2017  |___________ | _____________ | ____________ | ____________|

Columns of the excel sheet are- Date, associate1, associate2 and so on

I want to write the count of each associate in the cell which is at a particular date(say 9/20/2017) How can I write it into the excel?

0 Answers0