Python dataframe to csv - 1 line of code

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]()


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



i need data stored - value1, value2, value3

Taidot: Python

Näytä lisää: software write mq4, software write chip epson, python code sample csv scripts, useful software write book, software write web specs, free software write user guide, software write edid, free software write company profile, software write websites idea, software write book images, software write books, software write protection, free software write book, evald code line osc, csv matrix python, source code convert csv xml, python csvfile header, software write book, python convert url filename, call undefined function tep_cfg_select_multioption evald code line

Tietoa työnantajasta:
( 6 arvostelua ) Itasca, United States

Projektin tunnus: #11432748

Myönnetty käyttäjälle:


hi easy task for me. i can do this for you. i am proficient in python/pandas dataframe/csv. pls reply to start immediately.

$10 USD 1 päivässä
(4 Arvostelua)

4 freelanceria on tarjonnut keskimäärin 11$ tähän työhön

$15 USD 0 päivässä
(21 arvostelua)
$10 USD 1 päivässä
(47 arvostelua)

Hi, I have a good experience of coding in Python. I assure you that your work will be done perfectly and in minimum possible [login to view URL] give me a chance. Thank you. PS. If u offer me this,this will be my second pro Lisää

$10 USD 1 päivässä
(0 arvostelua)