Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8712729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:10:09+00:00 2026-06-13T05:10:09+00:00

I got some data and I need to convert it into a csv file.

  • 0

I got some data and I need to convert it into a csv file. I’m not a coder but I think that python can help me with these dict/tuples.

a = {
 'page': '1',
 'records': 984,
 'rows': [{'cell': ['2012000000885',
                    'A. B. OLIVEIRA - ME',
                    '10\\/08\\/2012',
                    '2.200,00',
                    '0,00',
                    '0,00'],
           'id': '2012000000885;02070712000102;2012;4'},
          {'cell': ['2012000000440',
                    'A. C SILVA E CIA LTDA',
                    '26\\/04\\/2012',
                    '600,00',
                    '600,00',
                    '600,00'],
           'id': '2012000000440;02070712000102;2012;4'},
          {'cell': ['2012000000104',
                    'ADAILTON PEREIRA DE OLIVEIRA',
                    '27\\/01\\/2012',
                    '100,00',
                    '100,00',
                    '100,00'],
           'id': '2012000000104;02070712000102;2012;4'},
          {'cell': ['2012000000261',
                    'ADAILTON PEREIRA DE OLIVEIRA',
                    '01\\/03\\/2012',
                    '200,00',
                    '200,00',
                    '200,00'],
           'id': '2012000000261;02070712000102;2012;4'},
          {'cell': ['2012000000360',
                    'ADAILTON PEREIRA DE OLIVEIRA',
                    '28\\/03\\/2012',
                    '200,00',
                    '200,00',
                    '200,00'],
           'id': '2012000000360;02070712000102;2012;4'}],
 'total': 1}   

I’m interest just on ‘rows’, I need separate ‘Id’ an ‘cell’ to import them to csv file.
Thank you in advance for any help.

Rogerio Marinho

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:10:11+00:00Added an answer on June 13, 2026 at 5:10 am
    import csv
    with open('output.csv', 'wb') as fout:
        csvout = csv.writer(fout)
        for row in a['rows']:
            csvout.writerow( [row['id']] + row['cell'] )
    

    Creates a CSV file with first column as ID and subsequent columns as whatever cell is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got some delimited data that I need to get into a Flex tree
I've got some code to convert a large (many gigabytes) XML file into another
I have binary data in a file that I can read into a byte
I've got some data (the output of a ddply function) that I want to
I've got a page that retrieves a bunch of locations and some data about
Just like in the title. I got GridView control that displaying some data from
I've got some data in the following format: -1,-1,-1,-1,701,-1,-1,-1,-1,-1,304,390,403,435,438,439,442,455 I need to insert it
I've got an iPhone/iPad app that has some data that's stored in a property
So, I've got some data tossed in a div. It's split up into chunks
I need to transfer some data from 3 spreadsheets (Which I got from another

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.