I have a call report from our Cisco phone system that for some reason spits out the dates as their own row on the CSV instead of just having a date field in (a new) Column A. Is there any way to quickly reformat this CSV so that the relevant dates are in column A for the records that matter? I am open to python or powershell solutions.
, , , , ,Date: ,Apr 1, 2024, , , ,
7:39:28 AM,7:39:56 AM,28,1396,8617,8617,SEPA4B43930E4EE,Y,N,N,N,N,2823198
9:01:13 AM,9:02:00 AM,47,1485,8617,8617,SEPA4B43930E4D5,Y,N,N,N,N,2823357
9:02:50 AM,9:04:16 AM,86,3206,8617,8617,SEPA4B43930F0A5,Y,N,N,N,N,2823368
9:03:15 AM,9:07:46 AM,271,3307,8617,8617,SEPA4B43930E4D5,Y,N,N,N,N,2823371
9:04:25 AM,9:08:20 AM,235,3206,1466,1466,CSFJCOULTER,Y,N,N,N,N,2823368
, , , , ,Date: ,Apr 2, 2024, , , ,
8:49:01 AM,8:49:08 AM,7,3104,8617,1000,CUCX-Trunk-HQ,Y,N,N,N,N,2825901
8:50:10 AM,8:51:44 AM,94,3104,8617,8617,SEPA4B43930E4D5,Y,N,N,N,N,2825905
8:58:31 AM,8:58:54 AM,23,3608,8617,8617,SEPA4B43930E4EE,Y,N,N,N,N,2825922
I have already tried exploring some python solutions with pandas, however I was unable to figure how to get pandas to detect the rows with the dates, let alone get them to move them to a new column.
Landon Goff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.