Re: *.csv to *.txt after adding columns

2013-09-18 Thread Peter Otten
Bryan Britten wrote: Hey, gang, I've got a problem here that I'm sure a handful of you will know how to solve. I've got about 6 *.csv files that I am trying to open; change the header names (to get rid of spaces); add two new columns, which are just the results of a string.split() command;

Re: *.csv to *.txt after adding columns

2013-09-18 Thread rusi
On Wednesday, September 18, 2013 7:12:21 AM UTC+5:30, Bryan Britten wrote: Hey, gang, I've got a problem here that I'm sure a handful of you will know how to solve. I've got about 6 *.csv files that I am trying to open; change the header names (to get rid of spaces); add two new columns,

Re: *.csv to *.txt after adding columns

2013-09-18 Thread Dave Angel
On 17/9/2013 22:28, Bryan Britten wrote: Dave - I can't print the output because there are close to 1,000,000 records. It would be extremely inefficient and resource intensive to look at every row. Not if you made a sample directory with about 3 files, each containing half a dozen lines.

Re: *.csv to *.txt after adding columns

2013-09-18 Thread Bryan Britten
Peter nailed it. Adding in the two lines of code to ensure I was just working with *.csv files fixed the problem. Thanks to everyone for the help and suggestions on best practices. -- https://mail.python.org/mailman/listinfo/python-list

*.csv to *.txt after adding columns

2013-09-17 Thread Bryan Britten
Hey, gang, I've got a problem here that I'm sure a handful of you will know how to solve. I've got about 6 *.csv files that I am trying to open; change the header names (to get rid of spaces); add two new columns, which are just the results of a string.split() command; drop the column I just

Re: *.csv to *.txt after adding columns

2013-09-17 Thread Dave Angel
On 17/9/2013 21:42, Bryan Britten wrote: Hey, gang, I've got a problem here that I'm sure a handful of you will know how to solve. I've got about 6 *.csv files that I am trying to open; change the header names (to get rid of spaces); add two new columns, which are just the results of a

Re: *.csv to *.txt after adding columns

2013-09-17 Thread Bryan Britten
Dave - I can't print the output because there are close to 1,000,000 records. It would be extremely inefficient and resource intensive to look at every row. Like I said, when I take just one file and run the code over the first few records I get what I'd expect to see. Here's an