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

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 example(non-red

Re: How do I calculate a mean with python?

2013-09-17 Thread Bryan Britten
William - I'm also self-teaching myself Python and get stuck quite often, so I understand both the thrill of programming and the frustration. Given your young age and presumably very little exposure to other programming languages, I would highly recommend you check out http://www.Codecademy.com

*.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 spl

Re: Limit Lines of Output

2013-06-25 Thread Bryan Britten
Joel - I don't want to send it to a text file because it's just meant to serve as a reference for the user to get an idea of what words are mentioned. The words being analyzed are responses to a survey questions and the primary function of this script is to serve as a text analytics program. Ex

Re: Limit Lines of Output

2013-06-25 Thread Bryan Britten
Ah, I always forget to mention my OS on these forums. I'm running Windows. -- http://mail.python.org/mailman/listinfo/python-list

Limit Lines of Output

2013-06-25 Thread Bryan Britten
Hey, group, quick (I hope) question: I've got a simple script that counts the number of words in a data set (it's more complicated than that, but that's one of the functions), but there are so many words that the output is too much to see in the command prompt window. What I'd like to be able t

Re: Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-28 Thread Bryan Britten
Thanks to everyone for the help and insight. I think for now I'll just back away from this file and go back to something much easier to practice with. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-27 Thread Bryan Britten
On Monday, May 27, 2013 7:58:05 PM UTC-4, Dave Angel wrote: > On 05/27/2013 04:47 PM, Bryan Britten wrote: > > > Hey, everyone! > > > > > > I'm very new to Python and have only been using it for a couple of days, > > but have some experience

Re: Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-27 Thread Bryan Britten
Try to not sigh audibly as I ask what I'm sure are two asinine questions. 1) How is this approach different from twtrDict = [json.loads(line) for line in urllib.urlopen(urlStr)]? 2) How do I tell how many JSON objects are on each line? -- http://mail.python.org/mailman/listinfo/python-list

Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-27 Thread Bryan Britten
Hey, everyone! I'm very new to Python and have only been using it for a couple of days, but have some experience in programming (albeit mostly statistical programming in SAS or R) so I'm hoping someone can answer this question in a technical way, but without using an abundant amount of jargon.