def number_of_tweets_per_day(df):
    """
        Calculates the number of tweets that were posted per day.
        Args:
            df (pandas dataframe): A pandas dataframe.
        Returns:
            df: Returns a new dataframe, grouped by day, with the number of tweets for that day.
    """
    df['Date']=df['Date'].str.split(expand=True)[0]
    return df.groupby('Date').count()