Re: i got error while writing data to file

2017-03-13 Thread Ben Iannitelli
Hello again, It seems I was a little too quick to hit "send". Option #2 of the two possible solutions I offered is not right. Here's what it should be (unless the formatting gets garbled): with open('E:/amadown2py-master/reviews1.csv', 'r',encoding='UTF8') as csvfile: with open('E:/amadown2

Re: i got error while writing data to file

2017-03-13 Thread Ben Iannitelli
Hi Madhu, I don't know much about web scraping but I can explain why your output is so much smaller than your input: you keep writing over your output file. The way I see it you have two options: 1. Where you wrote "mode='wt'", change "wt" to "at". The replacement "at" appends your output text

Re: i got error while writing data to file

2017-03-13 Thread Amit Yaron
You open the file more than once for which row with score greater than 3. Every time you open a file for writing it truncates an existing one with the same name. On 13/03/17 13:25, Madhusudhanan Sambath wrote: hi to all, this is madhu...i am new to python this is my python code, where i label

i got error while writing data to file

2017-03-13 Thread Madhusudhanan Sambath
hi to all, this is madhu...i am new to python this is my python code, where i labeled the reviews taken from amazon as positive, negative and neutral based on review score i have collected reviews and scores from amazon scrap prg, but i have problem while doing labelling.kindly help me import