diff --git a/docker/Dockerfile b/docker/Dockerfile index 0a48c102f..52f63b001 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -29,7 +29,7 @@ trusted-host = mirrors.aliyun.com" > /etc/pip.conf && \ pip install mysqlclient && \ pip install requests && \ pip install arrow && \ - pip install numpy==1.26.4 && \ + pip install numpy && \ pip install SQLAlchemy && \ pip install PyMySQL && \ pip install Logbook && \ diff --git a/instock/core/crawling/stock_fund_em.py b/instock/core/crawling/stock_fund_em.py index c194c5ff3..f043fe65c 100644 --- a/instock/core/crawling/stock_fund_em.py +++ b/instock/core/crawling/stock_fund_em.py @@ -312,6 +312,17 @@ def stock_sector_fund_flow_rank( "今日主力净流入最大股", ] ] + # temp_df['今日涨跌幅'] = pd.to_numeric(temp_df['今日涨跌幅']) + # temp_df['今日主力净流入-净额'] = pd.to_numeric(temp_df['今日主力净流入-净额']) + # temp_df['今日主力净流入-净占比'] = pd.to_numeric(temp_df['今日主力净流入-净占比']) + # temp_df['今日超大单净流入-净额'] = pd.to_numeric(temp_df['今日超大单净流入-净额']) + # temp_df['今日超大单净流入-净占比'] = pd.to_numeric(temp_df['今日超大单净流入-净占比']) + # temp_df['今日大单净流入-净额'] = pd.to_numeric(temp_df['今日大单净流入-净额']) + # temp_df['今日大单净流入-净占比'] = pd.to_numeric(temp_df['今日大单净流入-净占比']) + # temp_df['今日中单净流入-净额'] = pd.to_numeric(temp_df['今日中单净流入-净额']) + # temp_df['今日中单净流入-净占比'] = pd.to_numeric(temp_df['今日中单净流入-净占比']) + # temp_df['今日小单净流入-净额'] = pd.to_numeric(temp_df['今日小单净流入-净额']) + # temp_df['今日小单净流入-净占比'] = pd.to_numeric(temp_df['今日小单净流入-净占比']) elif indicator == "5日": temp_df.columns = [ "-", @@ -351,6 +362,17 @@ def stock_sector_fund_flow_rank( "5日主力净流入最大股", ] ] + # temp_df['5日涨跌幅'] = pd.to_numeric(temp_df['5日涨跌幅']) + # temp_df['5日主力净流入-净额'] = pd.to_numeric(temp_df['5日主力净流入-净额']) + # temp_df['5日主力净流入-净占比'] = pd.to_numeric(temp_df['5日主力净流入-净占比']) + # temp_df['5日超大单净流入-净额'] = pd.to_numeric(temp_df['5日超大单净流入-净额']) + # temp_df['5日超大单净流入-净占比'] = pd.to_numeric(temp_df['5日超大单净流入-净占比']) + # temp_df['5日大单净流入-净额'] = pd.to_numeric(temp_df['5日大单净流入-净额']) + # temp_df['5日大单净流入-净占比'] = pd.to_numeric(temp_df['5日大单净流入-净占比']) + # temp_df['5日中单净流入-净额'] = pd.to_numeric(temp_df['5日中单净流入-净额']) + # temp_df['5日中单净流入-净占比'] = pd.to_numeric(temp_df['5日中单净流入-净占比']) + # temp_df['5日小单净流入-净额'] = pd.to_numeric(temp_df['5日小单净流入-净额']) + # temp_df['5日小单净流入-净占比'] = pd.to_numeric(temp_df['5日小单净流入-净占比']) elif indicator == "10日": temp_df.columns = [ "-", @@ -390,6 +412,18 @@ def stock_sector_fund_flow_rank( "10日主力净流入最大股", ] ] + # temp_df['10日涨跌幅'] = pd.to_numeric(temp_df['10日涨跌幅']) + # temp_df['10日主力净流入-净额'] = pd.to_numeric(temp_df['10日主力净流入-净额']) + # temp_df['10日主力净流入-净占比'] = pd.to_numeric(temp_df['10日主力净流入-净占比']) + # temp_df['10日超大单净流入-净额'] = pd.to_numeric(temp_df['10日超大单净流入-净额']) + # temp_df['10日超大单净流入-净占比'] = pd.to_numeric(temp_df['10日超大单净流入-净占比']) + # temp_df['10日大单净流入-净额'] = pd.to_numeric(temp_df['10日大单净流入-净额']) + # temp_df['10日大单净流入-净占比'] = pd.to_numeric(temp_df['10日大单净流入-净占比']) + # temp_df['10日中单净流入-净额'] = pd.to_numeric(temp_df['10日中单净流入-净额']) + # temp_df['10日中单净流入-净占比'] = pd.to_numeric(temp_df['10日中单净流入-净占比']) + # temp_df['10日小单净流入-净额'] = pd.to_numeric(temp_df['10日小单净流入-净额']) + # temp_df['10日小单净流入-净占比'] = pd.to_numeric(temp_df['10日小单净流入-净占比']) + return temp_df diff --git a/requirements.txt b/requirements.txt index 919034bc2..7da59878f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -numpy==1.26.4 +numpy==2.1.3 pandas==2.2.3 py_mini_racer==0.6.0 -TA_Lib==0.4.32 +TA_Lib==0.5.0 arrow==1.3.0 bokeh==3.6.0 PyMySQL==1.1.1