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 8277345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:40:00+00:00 2026-06-08T08:40:00+00:00

I’m sure there is an easy way to do this, so here goes. I’m

  • 0

I’m sure there is an easy way to do this, so here goes. I’m trying to export my lists into CSV in columns. (Basically, it’s how another program will be able to use the data I’ve generated.) I have the group called [frames] which contains [frame001], [frame002], [frame003], etc. I would like the CSV file that’s generated to have all the values for [frame001] in the first column, [frame002] in the second column, and so on. I thought if I could save the file as CSV I could manipulate it in Excel, however, I figure there is a solution that I can program to skip that step.

This is the code that I have tried using so far:

import csv

data = [frames]
out = csv.writer(open(filename,"w"), delimiter=',',quoting=csv.QUOTE_ALL)
out.writerow(data)

I have also tried:

import csv

myfile = open(..., 'wb')
wr = csv.writer(myfile, quoting=csv.QUOTE_ALL)
wr.writerow(mylist)

Most recently I have tried:

import csv

data = [frames]
out = csv.writer(open(filename,"w"), delimiter=',',quoting=csv.QUOTE_ALL)
out.writerows(zip(*data))

After more research, I’m actually needing to build an XML file, but I still need the data to be in the correct order. That is, the contents of [frame001] in a column, [frame002] in the next column, etc. All frames contain the same amount of information.

Thanks again for any assistance!

This is an example of the data for what the first 2 columns look like:
[255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0], [0, 171, 205, 0, 171, 205, 0, 171, 205, 0, 171, 205, 0, 171, 205, 0, 171, 205, 0, 171, 205, 0, 171, 205, 0, 171, 205, 0, 171, 205]

When it should be:

255 0
0   171
0   205
255 0
0   171
0   205
255 0
0   171
0   205
255 0
0   171
0   205
255 0
0   171
0   205
255 0
0   171
0   205
255 0
0   171
0   205
255 0
0   171
0   205
255 0
0   171
0   205
255 0
0   171
0   205

I hope that makes sense.

  • 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-08T08:40:03+00:00Added an answer on June 8, 2026 at 8:40 am

    XML isn’t really a row and column based format like csv; it’s hierarchical, and probably not the best format for storing row/column data. You would need tags to specify rows and columns, and if you’re importing this into another application, it would need to know what the row and column tags were to parse it correctly.

    Is the second application written in python as well? If so, just use the python pickle module to serialize your 2D python list. That way your 2nd app can just read it back in as a 2D list, instead of marshaling it back and forth to csv or xml.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I know there's a lot of other questions out there that deal with this
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.