Skip to content

Commit

Permalink
number of items populated into AD_HOC now made into a setting bc i am…
Browse files Browse the repository at this point in the history
… nice
  • Loading branch information
Stephanie Szeto committed Mar 7, 2021
1 parent ea70cc2 commit ce310d5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions overview-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
from df2gspread import df2gspread as d2g

print('Warming up ...')

# here lie random settings you can update
verbose = False # update to True if you want a detailed description of what your script is doing
num_tickers_to_show = 50 # setting to configure how many tickers to pre-populate in your ad-hoc sheet

# here you have to enter your actual API key
api_key = configs.api_key
Expand Down Expand Up @@ -247,8 +250,8 @@
d2g.upload(table, spreadsheet_key, type, credentials=creds, row_names=True)

ad_hoc = sheet.worksheet("AD-HOC")
if len(tickers) >= 50:
tickers = tickers[:49]
if len(tickers) >= num_tickers_to_show:
tickers = tickers[:num_tickers_to_show - 1]
last_row = len(tickers) - 1
range = 'A7:A' + str(last_row + 7)
ad_hoc.update(range, [[ticker] for ticker in tickers])
Expand Down

0 comments on commit ce310d5

Please sign in to comment.