Python dataframe to csv - 1 line of code
$10 USD
Pagado a la entrega
I have a dataframe I was storing into a csv and it worked perfectly fine. now I need to take each row from that dataframe and store it into a different csv file based upon the name of the first column in each row.
ds = DataFrame(data)
#I used the following
for index, row in [url removed, login to view]()
sname=row['1st_column_name']
with open('filename/'+sname+'.csv, 'a') as f:
row.to_csv(f, index=false,header=false)
it worked perfect and is storing the data however, its storing each row from that dataframe as a column and not as 1 row in the csv file. So the task is that I need the data to be store all in one row and not each piece of data having its own row.
currently store - value1
value2
value3
i need data stored - value1, value2, value3
Nº del proyecto: #11432748
Sobre el proyecto
Adjudicado a:
hi easy task for me. i can do this for you. i am proficient in python/pandas dataframe/csv. pls reply to start immediately.