[Chennaipy] Beginner in python

Shri Aditya Vagicherla shri2626 at yahoo.com
Sun Oct 18 02:09:55 CEST 2015


Hi, 

For my project i am trying find item sets. I have been givena data file with data in the following form 

lines with starts with letter A, those tells us the ID of the website and the Title 
The line with ”C” separates users and the lines with ”V” are the websites they visited.
A,1121,1,"Microsoft Magazine","/magazine"
A,1083,1,"MS Access Support","/msaccesssupport"
A,1145,1,"Visual Fox Pro Support","/vfoxprosupport"
A,1276,1,"Visual Test Support","/vtestsupport"
C,"10001",10001
V,1000,1
V,1001,1
V,1002,1
C,"10002",10002
V,1001,1
V,1003,1
C,"10003",10003
V,1001,1
V,1003,1
V,1004,1

 
I am supposed to classify and filter the data based on theuser and the websites he visited. But the entire data is in one file and myprogram reads the file line by line. I am not able to figure out how to processthe user and then the websites he visited to bucket them into a list in whicheach line consists of websites visited by that user alone. 


could someone help me with generating the output file which must have a list of buckets, each bucket with the sites visited by one user. For example



"Support Desktop","Knowledge Base"
"Support Desktop","Knowledge Base","Microsoft.com Search"
"Norway"
"misc"
"Knowledge Base","Microsoft.com Search"
"International IE content"
"Microsoft.com Search"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chennaipy/attachments/20151018/b4c71677/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: project.py
Type: application/octet-stream
Size: 680 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/chennaipy/attachments/20151018/b4c71677/attachment.obj>


More information about the Chennaipy mailing list