已完成

Python script to fix CSV file

I export a cell phone log to csv once a month and in the caller-id field it sometimes places a comma between last and first and/initial so the csv thinks they are separate columns.

Example:

Extension, CallFrom, CallTime, CallTo...

1234,John Smith,12:05,Sally Smith (valid record)

1234,Smith,John, 12:05 (invalid)

So for example, above, the first record is good. Where the second record is bad. The name John becomes the Call Time value, and the CallTime value becomes CallTo... Etc.

Info: We know there are 13 columns in csv table. And we know the extra commas/field will only occur following the second comma (after CallerId column).

A good row/record will have 12 commas. Whereas a bad row/record will have 13 or 14 (depending if middle initial was used), e.g. Smith, John, P...

So programming logic would be something like...

Count(",") each row

If 12

Write row

If 13

Delete all characters between comma 2 and comma 3

Write row

If 14

Delete all characters between comma 2 and comma 4

Write row

Please ask me any questions. And I am open to any ideas or other solutions.

技能: Python

查看更多: python programming ideas, Programming Logic, programming in python 3, data processing, excel, csv, logic it solutions, cell phone programming, write a python script, python script, invalid script, fix python, comma fix, table csv, csv table, python script convert file csv, python log file script, programming caller, python script convert text file csv file, python script parse text file csv file

关于此雇主:
( 8个评论 ) Lee, United States

项目ID: #7510144

授予:

bouwenwerks

I'm just starting out on the freelance work, but I do this type of work day in day out and can easily provide you with what you need.

$15 USD 在1天内
(1条评论)
0.6

8 威客就此工作平均出价 $21

rekreacija

hello, you can place your confidence in my Python knowledge and experience. your description looks well thought out, so we'll test if it works as you expect it to. greets, srdjan

$25 USD 在3天内
(15条评论)
4.1
RafaAguilar1987

hello there fellow, I could do this job in no time, just using some regexes on Python, look my last projects you sure will be glad with the results Rafael Aguilar [login to view URL]

$25 USD 在0天内
(11条评论)
3.8
sheikhasif123

I know python well. I can solve this in less than 2 hours. Ping me if you want to finish this off soon. You can check my python related work here .[login to view URL]

$20USD 在1天里
(5条评论)
3.0
cungthehung

Hi. Certainly i can done your project in few hours. I did complete 100% project for my employer quickly. Hope we have a deal. Thank you!

$25 USD 在0天内
(6条评论)
3.2
rakib062

Hi, I am a graduate in CS and working as a Python programmer for 4+ years. I have done lots of assignments both in academic courses and in freelancer.com. I assure you of clean, efficient code with proper comment 更多

$30USD 在1天里
(5条评论)
3.1
Petomatick

I'll write the program today and send it through a message to you. If you like it you can hire me. I'll be writing it nonetheless and having other people rip you off for a few lines of code isn't nice.

$10 USD 在2天内
(0条评论)
0.0
ishfaq8

Can you attach CSV so I can test Python script?

$15USD 在1天里
(0条评论)
0.0