Comments (6)
MKD30015
can be called directly as follows:
from pykrx.website.krx.market.core import MKD30015
df = MKD30015().fetch(date="20200916", market="ALL")
df.head()
It is recommended to use stock.get_market_cap_by_ticker
as a user-friendly API.
from pykrx import stock
df = stock.get_market_cap_by_ticker(date="20200916", market="ALL")
In my environment, the API prints out the correct results. If you attach the code you wrote, I will check it in detail.
from pykrx.
In the current version, the business day of the stock market should be passed by variable date
of the API.
from pykrx.
targetDayStr="20200917"
print(stock.get_market_ticker_list("20200921"))
dfTargetDay = stock.get_market_cap_by_ticker(targetDayStr)
if (dfTargetDay.empty):
print('targetDay empty. day: ' + targetDayStr)
It seems to be a version problem or a module dependency problem. Please check PYKRX version first.
import pykrx
print(pykrx.__version__)
If the version is lower than 0.1.41
, upgrade to the latest version.
pip install -U pykrx
If the latest version does not fix the problem, please attach a list of installed modules that you see as a result of pip freeze
.
from pykrx.
asgiref==3.2.10
astroid==2.4.2
certifi==2020.6.20
chardet==3.0.4
colorama==0.4.3
comtypes==1.1.7
DateTime==4.3
Django==3.0.8
et-xmlfile==1.0.1
excel2img==1.4.0
idna==2.10
image==1.5.32
isort==4.3.21
jdcal==1.4.1
lazy-object-proxy==1.4.3
mccabe==0.6.1
numpy==1.19.1
openpyxl==3.0.4
pandas==1.0.5
Pillow==7.2.0
pykrx==0.1.41
pylint==2.5.3
pypiwin32==223
PyQt5==5.15.0
PyQt5-sip==12.8.0
python-dateutil==2.8.1
pytz==2020.1
pywin32==228
pywinauto==0.6.8
requests==2.24.0
six==1.15.0
sqlparse==0.3.1
toml==0.10.1
urllib3==1.25.10
wrapt==1.12.1
xlrd==1.2.0
zope.interface==5.1.0
from pykrx.
The code works well in a virtual environment made from a list of modules you provide.
$ python --version
Python 3.7.6
$ virtualenv venv
$ source venv/Script/activate
venv $ pip intall -r requirement.txt
I will check the code with the latest Python (version 3.8.4). If it goes well, I think you'd better reinstall Python.
from pykrx.
It operates normally in the pure python 3.8.4 and the latest Anaconda (3.8.3).
- I tested the codes with python 3.8.4 on
https://repl.it/languages/python3
website and with anaconda on my desktop.
I don't think there's anything I can help with given information.
from pykrx.
Related Issues (20)
- AttributeError: 'DataFrame' object has no attribute 'append' HOT 2
- get_market_ohlcv_by_date 지수는 return이 없음 HOT 5
- pykrx에서 return없음 HOT 1
- 관리, 투자주의환기 종목 HOT 1
- 수정주가 기능 HOT 7
- 파생상품 전종목시세 코드 수정 필요할 것 같습니다 HOT 1
- return 없음 HOT 2
- stock.get_market_price_change('20230815', '20230815', market = "ALL") HOT 5
- AttributeError: module 'pykrx.stock' has no attribute 'get_stock_ticker_list' 문의 HOT 2
- get_index_ohlcv 사용 시 2년 기간 제한 HOT 1
- 해결됐습니다~!
- get_shorting_balance_by_ticker - 일자 딜레이가 있나요? HOT 1
- IP 차단 HOT 1
- get_exhaustion_rates_of_foreign_investment error? HOT 1
- 갑자기 함수에서 아무런 return이 나오지 않습니다. HOT 1
- 동일한 method 호출에 대해서 어떤 경우에는 Empty DataFrame이 응답됩니다. HOT 1
- 공매도 정보 획득시 json의 key값이 'OutBlock_1' 이어서 2년 넘는경우엔 key error 가 납니다. HOT 1
- 특정 날짜의 티커에 대한 종목명을 받을 수가 없어요. HOT 1
- 외국인 지분율 에러 (어쩔땐 잘 되긴한데, 최근에 자주 안됨) HOT 1
- stock.get_market_ohlcv_by_date 거래대금 누락 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pykrx.