<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 How many tweets are about the 'wall'?
Step1:  What is the average twitter tenure of people who tweeted about the wall?
Step2:  There are a couple of users tweeting multiple times, but most tweets come from distinct twitter handles
Step3:  Who are the 'top tweeters' + descriptions?
Step4:  What is the reach of these tweets in terms of followers?
Step5:  Location of the tweets?
<ASSISTANT_TASK:>
Python Code:
# Lowercase the hashtags and tweet body
df['hashtags'] = df['hashtags'].str.lower()
df['text'] = df['text'].str.lower()
print("Total number of tweets containing hashtag 'wall' = {}".format(len(df[df['hashtags'].str.contains('wall')])))
print("Total number of tweets whose body contains 'wall' = {}".format(len(df[df['text'].str.contains('wall')])))
wall_tweets = df[(df['hashtags'].str.contains('wall')) | (df['text'].str.contains('wall'))].copy()
print("Total number of tweets about the 'wall' = {}".format(len(wall_tweets)))
Explanation: How many tweets are about the 'wall'?
End of explanation
def months_between(end, start):
    return (end.year - start.year)*12 + end.month - start.month
wall_tweets['created'] = pd.to_datetime(wall_tweets['created'])
wall_tweets['user_created'] = pd.to_datetime(wall_tweets['user_created'])
wall_tweets['user_tenure'] = wall_tweets[['created', \
                            'user_created']].apply(lambda row: months_between(row[0], row[1]), axis=1)
tenure_grouping = wall_tweets.groupby('user_tenure').size() / len(wall_tweets) * 100
fig, ax = plt.subplots()
ax.plot(tenure_grouping.index, tenure_grouping.values)
ax.set_ylabel("% of tweets")
ax.set_xlabel("Acct tenure in months")
plt.show()
Explanation: What is the average twitter tenure of people who tweeted about the wall?
End of explanation
tweets_per_user = wall_tweets.groupby('user_name').size().sort_values(ascending=False)
fig, ax = plt.subplots()
ax.plot(tweets_per_user.values)
plt.show()
Explanation: There are a couple of users tweeting multiple times, but most tweets come from distinct twitter handles
End of explanation
wall_tweets.groupby(['user_name', 'user_description']).size().sort_values(ascending=False).head(20).to_frame()
Explanation: Who are the 'top tweeters' + descriptions?
End of explanation
plt.boxplot(wall_tweets['friends_count'].values, vert=False)
plt.show()
wall_tweets['friends_count'].describe()
Explanation: What is the reach of these tweets in terms of followers?
End of explanation
wall_tweets.groupby('user_location').size().sort_values(ascending=False)
Explanation: Location of the tweets?
End of explanation
<END_TASK>