Closed Griffs2 closed 3 months ago
Bạn download bản mới nhất về nhé, đã hỗ trợ lấy các mã từ sàn UPCOM
loader = dt.DataLoader('BSR', '2000-01-01','2022-06-03')
df = loader.download()
print(df)
Kết qủa:
Attributes code close open high low ... value_match volume_reconcile value_reconcile total_volume total_value
Symbols BSR BSR BSR BSR BSR ... BSR BSR BSR BSR BSR
date ...
2022-06-02 BSR 27.1 27.6 28.6 27.0 ... 5.172306e+11 106900.0 2.907680e+09 18789069.0 5.201383e+11
2022-06-01 BSR 27.6 26.5 27.8 25.9 ... 4.228698e+11 0.0 0.000000e+00 15606701.0 4.228698e+11
2022-05-31 BSR 26.6 25.0 27.2 24.8 ... 5.841468e+11 0.0 0.000000e+00 22264665.0 5.841468e+11
2022-05-30 BSR 24.8 24.2 25.5 23.9 ... 2.846572e+11 106900.0 2.565600e+09 11515240.0 2.872228e+11
2022-05-27 BSR 23.9 23.8 24.5 23.5 ... 1.905602e+11 0.0 0.000000e+00 7950331.0 1.905602e+11
... ... ... ... ... ... ... ... ... ... ... ...
2018-03-07 BSR 29.9 30.7 31.5 29.6 ... 8.453388e+10 50000.0 1.305000e+09 2820016.0 8.583888e+10
2018-03-06 BSR 30.9 31.0 31.5 30.0 ... 9.612550e+10 25000.0 7.315000e+08 3157026.0 9.685700e+10
2018-03-05 BSR 31.0 33.0 33.0 30.9 ... 1.281817e+11 115000.0 3.239000e+09 4198263.0 1.314207e+11
2018-03-02 BSR 31.3 33.1 33.8 31.0 ... 2.512819e+11 2232474.0 6.013007e+10 9927891.0 3.114120e+11
2018-03-01 BSR 31.3 31.3 31.3 29.2 ... 4.339178e+11 0.0 0.000000e+00 14162900.0 4.339178e+11
Mình lấy giá cổ phiếu sàn Upcom như sau:
loader = dt.DataLoader('BSR', '2000-01-01','2022-06-03')
df = loader.download()
Báo lỗi: `File ~\Anaconda3\lib\site-packages\vnquant-0.0.3-py3.9.egg\vnquant\data\dataloader.py:256 in download_one stock_data['change_perc1'], stock_data['change_perc2'] = stock_data['change_perc'].apply(utils.split_change_col).str
ValueError: not enough values to unpack (expected 2, got 1)`