Skip to content

Commit

Permalink
修复重复及数据不对应等错误
Browse files Browse the repository at this point in the history
  • Loading branch information
myhhub committed Dec 13, 2024
1 parent 6f3fabc commit 962dd84
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions instock/core/stockfetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def fetch_stock_selection():
if data is None or len(data.index) == 0:
return None
data.columns = list(tbs.TABLE_CN_STOCK_SELECTION['columns'])
data.drop_duplicates('code', keep='last', inplace=True)
return data
except Exception as e:
logging.error(f"stockfetch.fetch_stocks_selection处理异常:{e}")
Expand Down
2 changes: 1 addition & 1 deletion instock/core/tablestructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
'volume': {'type': BIGINT, 'cn': '成交量', 'size': 90},
'deal_amount': {'type': BIGINT, 'cn': '成交额', 'size': 100},
'amplitude': {'type': FLOAT, 'cn': '振幅', 'size': 70},
'volume_ratio': {'type': FLOAT, 'cn': '量比', 'size': 70},
'turnoverrate': {'type': FLOAT, 'cn': '换手率', 'size': 70},
'volume_ratio': {'type': FLOAT, 'cn': '量比', 'size': 70},
'open_price': {'type': FLOAT, 'cn': '今开', 'size': 70},
'high_price': {'type': FLOAT, 'cn': '最高', 'size': 70},
'low_price': {'type': FLOAT, 'cn': '最低', 'size': 70},
Expand Down
2 changes: 0 additions & 2 deletions instock/lib/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from sqlalchemy import create_engine
from sqlalchemy.types import NVARCHAR
from sqlalchemy import inspect
from urllib.parse import quote_plus as urlquote

__author__ = 'myh '
__date__ = '2023/3/10 '
Expand All @@ -29,7 +28,6 @@
_db_password = os.environ.get('db_password')
if _db_password is not None:
db_password = _db_password
db_password = urlquote(db_password)
_db_database = os.environ.get('db_database')
if _db_database is not None:
db_database = _db_database
Expand Down

0 comments on commit 962dd84

Please sign in to comment.