Find Jobs
Hire Freelancers

Python dataframe to csv - 1 line of code

$10 USD

Completed
Posted over 7 years ago

$10 USD

Paid on delivery
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 [login to view URL]() 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
Project ID: 11432748

About the project

4 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
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 in 1 day
4.9 (4 reviews)
3.8
3.8

About the client

Flag of UNITED STATES
Itasca, United States
5.0
6
Payment method verified
Member since May 9, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.