function which calculates the number of tweets that were posted per day. 1

function which calculates the number of tweets that were posted per day.

d = pd.to_datetime(['2019-11-29', '2019-11-30']).repeat(10)
df = pd.DataFrame({'Tweets':'anything', 'Date':d})
df

Here is what the above code is Doing:
1. Create a list of dates
2. Repeat the list 10 times
3. Create a dataframe with the repeated list as the ‘Date’ column

Similar Posts