I’m pretty much new to the coding thing, yet i was assigned a task to take a data from a CSV file which is a export from a Biometric function, what i need to do is to take that data and pasted on another CSV file that is sent to the client.
So far I’m able with this code to read the file and create the file that needs to be sent, but I’m unable to pasted the data to it.
import csv
with open('clock_in.csv', "wt") as fp:
writer = csv.writer(fp, delimiter=".")
writer.writerows(['data'])
with open ("clock-in.csv", ) as fp:
reader = csv.reader(fp, delimiter=",", quotechar='"')
data_read = [row for row in reader]
print(data_read)
Regarding the headers and such pretty much are:
[‘Data’]
[‘NO’], [‘Last_Name’], [‘First_Name’], [‘Date’], [‘Time’], [‘Status’]
Any ideas on how to do extract the data from the file A and then pasted to File B?, also other issue that i haven’t being able to figure out is to skip the rows that on the Status column is equal to False.
Really glad to get any help given, beforehand thank you so much!
I have tried multiple public answer and yet nothing seems to work, i try with pandas and didnt work it gave me an error message. the closest that i been to successfully complete the task is this where the program is able to read the code but not able to copy the data and added to the other file because haha i dont know, sorry.
kazuki zagara is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.