Skip to content

Commit 97e22b5

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 3d90a88 + 55ff8f5 commit 97e22b5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,19 @@ Any quotes data displayed on finviz.com is delayed by 15 minutes for NASDAQ, and
2525
from finviz.screener import Screener
2626

2727
filters = ['exch_nasd', 'idx_sp500'] # Shows companies in NASDAQ which are in the S&P500
28-
stocks = Screener(filters=filters, order='price') # Get the first 50 results sorted by price ascending
28+
stock_list = Screener(filters=filters, order='price') # Get the first 50 results sorted by price ascending
2929

3030
# Export the screener results to .csv
31-
stocks.to_csv()
31+
stock_list.to_csv()
3232

3333
# Create a SQLite database
34-
stocks.to_sqlite()
34+
stock_list.to_sqlite()
35+
36+
for stock in stock_list[9:19]: # Loop through 10th - 20th stocks
37+
print(stock['Ticker'], stock['Price']) # Print symbol and price
3538

3639
# Print the table into the console
37-
print(stocks)
40+
print(stock_list)
3841

3942
![alt text](https://i.imgur.com/cb7UdxB.png)
4043

0 commit comments

Comments
 (0)