Skip to content

Commit

Permalink
Fix qurey database bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmysitu committed Apr 20, 2024
1 parent f2f1ed4 commit 700c6ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/get_xshg.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
)

tickers_list = {
'603288', '600519', '688041',
'603288', # Fosha Haitian
'600519', # Kweichow Moutai
'688041', # Hygon
'688047', # Loongson

}

for ticker in sorted(tickers_list):
Expand Down
2 changes: 1 addition & 1 deletion msfinance/stocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _check_database(self, unique_id):
'''
if self.db:
try:
query = f"SELECT * FROM {unique_id}"
query = f"SELECT * FROM '{unique_id}'"
df = pd.read_sql_query(query, self.db)
return df
except pd.errors.DatabaseError as e:
Expand Down

0 comments on commit 700c6ed

Please sign in to comment.