Having the following dataframe:

```
                     UserID TweetLanguage
2014-08-25 21:00:00  001        english
2014-08-27 21:04:00  001        arabic
2014-08-29 22:07:00  001        espanish
2014-08-25 22:09:00  002        english
2014-08-26 22:09:00  002        espanish
2014-08-25 22:09:00  003        english 

```

I need to plot the weekly number of users who have posted in more than one language. 

For example, in the above dataframe, user 001 and 002 have tweeted in more than one languages. So in the plot, the corresponding value for this week should be 2. Same story for other weeks.
['https://Stackoverflow.com/questions/52937718', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5413088/']
```
df.groupby([pd.Grouper(freq='W'), 'User ID'])['TweetLanguage'].nunique().unstack().plot()

```
Use 2 `groupbys`. The first finds the users who post in more than one language every week, the second counts how many there are per week. 

```
(df.groupby([df.index.year.rename('year'), df.index.week.rename('week'), 'UserID']).TweetLanguage.nunique() > 1).groupby(level=[0,1]).sum()

#year  week
#2014  35      2.0
#Name: TweetLanguage, dtype: float64

```