Hi Team,
I am doing second project "
Python Programming - Project - Part 2" and I am facing issue.
Kindly provide the setup by setup so that I can complete my projects.
Thanks in Advance for help.
Below find the code which I am using:
fhand = open(‘mbox-short.txt’, ‘r’)
for line in fhand:
if line.startswith(‘From:’) :
l = line.rstrip()
print(l.split()[1])
words = l.split()
counts = dict()
for word in words:
counts[word] = counts.get(word,0) + 1
bigcount = None
bigword = None
for word,count in counts.items():
if bigcount is None or count > bigcount:
bigword = word
bigcount = count
print(bigword, bigcount)
Python Programming - Project - Part 2
Objective: The objective of this project is to analyze the email data you collected in the previous project.
INSTRUCTIONS
From the data you collected and the concepts you learned in the class (Numpy and dataframes in Pandas) do the following analysis on the data :
Create the dataframe from the emails using the technique defined in previous project.
Find the top 5 times of the week when you receive the most number of emails. Hint. Categorise the data on the basis of time into slots and find the slot with the most number of emails.
Who has sent you the maximum number of emails?
To whom have you sent the maximum number of emails?
On the basis of above two analysis decide who is your closest buddy. You are free to derive your own formula for choosing your closest buddy. One of the criteria can be the person whom you converse frequently.