-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSession2
More file actions
15 lines (12 loc) · 910 Bytes
/
Session2
File metadata and controls
15 lines (12 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# STEP 2 - Pick and Input {KEYWORD} and {NUMBER OF TWEETS} to scrape tweets
# Random date solution
nubmer_of_random_day = int(input('Number of random day: '))
start_everyday_list=[]
for i in range(int(len(start_date_list))):
for k in range(nubmer_of_random_day):
start_everyday_list.append(radar.random_datetime(start_date_list[i].date()+timedelta(days=1), stop=end_date_list[i].date()-timedelta(days=1)))
print('---------------------------------------------------------------------------------------------------')
print(f'| There are {numbers_of_quarter} quarters. For each quarter, there are {nubmer_of_random_day} random days. Total number of days = {len(start_everyday_list)} |')
print('---------------------------------------------------------------------------------------------------')
for i in start_everyday_list:
print(f'{i.year}_Q{pd.Timestamp(i).quarter} | start_date: {i}')