neurostats-API 0.0.15__tar.gz → 0.0.16__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {neurostats_API-0.0.15/neurostats_API.egg-info → neurostats_api-0.0.16}/PKG-INFO +69 -8
- neurostats_API-0.0.15/PKG-INFO → neurostats_api-0.0.16/README.md +62 -17
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/__init__.py +1 -1
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/fetchers/base.py +30 -28
- neurostats_api-0.0.16/neurostats_API/fetchers/tej_finance_report.py +339 -0
- neurostats_api-0.0.16/neurostats_API/fetchers/value_invest.py +187 -0
- neurostats_API-0.0.15/README.md → neurostats_api-0.0.16/neurostats_API.egg-info/PKG-INFO +78 -7
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/setup.py +1 -1
- neurostats_API-0.0.15/neurostats_API/fetchers/tej_finance_report.py +0 -313
- neurostats_API-0.0.15/neurostats_API/fetchers/value_invest.py +0 -170
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/MANIFEST.in +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/cli.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/fetchers/__init__.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/fetchers/balance_sheet.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/fetchers/cash_flow.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/fetchers/finance_overview.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/fetchers/institution.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/fetchers/margin_trading.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/fetchers/month_revenue.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/fetchers/profit_lose.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/fetchers/tech.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/main.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/tools/balance_sheet.yaml +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/tools/cash_flow_percentage.yaml +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/tools/finance_overview_dict.yaml +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/tools/profit_lose.yaml +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/tools/seasonal_data_field_dict.txt +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/utils/__init__.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/utils/calculate_value.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/utils/data_process.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/utils/datetime.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/utils/db_client.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API/utils/fetcher.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API.egg-info/SOURCES.txt +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API.egg-info/dependency_links.txt +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API.egg-info/requires.txt +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/neurostats_API.egg-info/top_level.txt +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/setup.cfg +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/test/test_fetchers.py +0 -0
- {neurostats_API-0.0.15 → neurostats_api-0.0.16}/test/test_tej.py +0 -0
@@ -1,12 +1,18 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
|
-
Name:
|
3
|
-
Version: 0.0.
|
2
|
+
Name: neurostats_API
|
3
|
+
Version: 0.0.16
|
4
4
|
Summary: The service of NeuroStats website
|
5
5
|
Home-page: https://github.com/NeurowattStats/NeuroStats_API.git
|
6
6
|
Author: JasonWang@Neurowatt
|
7
7
|
Author-email: jason@neurowatt.ai
|
8
8
|
Requires-Python: >=3.6
|
9
9
|
Description-Content-Type: text/markdown
|
10
|
+
Requires-Dist: numpy>=2.1.0
|
11
|
+
Requires-Dist: pandas>=2.2.0
|
12
|
+
Requires-Dist: pymongo
|
13
|
+
Requires-Dist: pytz
|
14
|
+
Requires-Dist: python-dotenv
|
15
|
+
Requires-Dist: yfinance
|
10
16
|
|
11
17
|
# neurostats_API
|
12
18
|
|
@@ -83,7 +89,7 @@ pip install neurostats-API
|
|
83
89
|
```Python
|
84
90
|
>>> import neurostats_API
|
85
91
|
>>> print(neurostats_API.__version__)
|
86
|
-
0.0.
|
92
|
+
0.0.16
|
87
93
|
```
|
88
94
|
|
89
95
|
### 得到最新一期的評價資料與歷年評價
|
@@ -685,21 +691,25 @@ fetcher = FinanceReportFetcher(
|
|
685
691
|
|
686
692
|
data = fetcher.get(
|
687
693
|
ticker = "2330" # 任意的股票代碼
|
688
|
-
fetch_mode = fetcher.
|
694
|
+
fetch_mode = fetcher.FetchMode.QOQ_NOCAL # 取得模式
|
689
695
|
start_date = "2005-01-01",
|
690
696
|
end_date = "2024-12-31",
|
691
697
|
report_type = "Q",
|
692
698
|
indexes = []
|
693
|
-
)
|
699
|
+
) # -> pd.DataFrame or Dict[pd.DataFrame]
|
694
700
|
```
|
695
701
|
- `ticker`: 股票代碼
|
696
702
|
|
697
703
|
- `fetch_mode` : 取得模式,為`fetcher.YOY_NOCAL` 或 `fetcher.QOQ_NOCAL`
|
698
|
-
- `YOY_NOCAL`: 以end_date為準,取得與end_date
|
704
|
+
- `YOY_NOCAL`: 以end_date為準,取得與end_date同季的歷年資料,時間範圍以start_date為起始
|
699
705
|
> 例如`start_date = "2020-07-01"`, `end_date = "2024-01-01"`,會回傳2020~2024的第一季資料
|
700
706
|
|
701
707
|
- `QOQ_NOCAL`: 時間範圍內的每季資料
|
702
708
|
|
709
|
+
- `QOQ`: 時間範圍內每季的每個index的數值以及QoQ
|
710
|
+
|
711
|
+
- `YoY`: 以end_date為準,取得與end_date同季的歷年資料以及成長率,時間範圍以start_date為起始
|
712
|
+
|
703
713
|
- `start_date`: 開始日期,不設定時預設為`2005-01-01`
|
704
714
|
|
705
715
|
- `end_date`: 結束日期,不設定時預設為資料庫最新資料的日期
|
@@ -716,10 +726,61 @@ data = fetcher.get(
|
|
716
726
|
請看 `會計師簽證財務資料`
|
717
727
|
|
718
728
|
#### 回傳資料
|
719
|
-
|
720
|
-
|
729
|
+
##### `YOY_NOCAL` 與 `QOQ_NOCAL`
|
730
|
+
為回傳`pd.DataFrame`,column名稱為<年份>Q<季>, row名稱為指定財報項目
|
731
|
+
```Python
|
732
|
+
# fetch_mode = fetcher.FetchMode.QOQ_NOCAL
|
733
|
+
2024Q3 2024Q2 2024Q1
|
734
|
+
bp41 7.082005e+07 6.394707e+07 5.761001e+07
|
735
|
+
bp51 3.111298e+09 3.145373e+09 3.091985e+09
|
736
|
+
|
737
|
+
# fetch_mode = fetcher.FetchMode.YOY_NOCAL
|
738
|
+
2024Q3 2023Q3 2022Q3
|
739
|
+
bp41 7.082005e+07 5.377231e+07 6.201822e+07
|
740
|
+
bp51 3.111298e+09 3.173919e+09 2.453840e+09
|
741
|
+
```
|
742
|
+
|
743
|
+
##### `YOY` 與 `QOQ`
|
744
|
+
回傳為`Dict[pd.DataFrame]`, key 為指定的index, DataFrame中則是該index歷年的數值與成長率
|
745
|
+
```Python
|
746
|
+
# fetch_mode = fetcher.FetchMode.QOQ
|
747
|
+
{
|
748
|
+
'bp41':
|
749
|
+
2024Q3 2024Q2 2024Q1
|
750
|
+
value 7.082005e+07 6.394707e+07 5.761001e+07
|
751
|
+
growth 1.074791e-01 1.099994e-01 5.532101e-03,
|
752
|
+
'bp51':
|
753
|
+
2024Q3 2024Q2 2024Q1
|
754
|
+
value 3.111298e+09 3.145373e+09 3.091985e+09
|
755
|
+
growth -1.083335e-02 1.726663e-02 -4.159542e-03
|
756
|
+
}
|
757
|
+
|
758
|
+
# fetch_mode = fetcher.FetchMode.YOY
|
759
|
+
{
|
760
|
+
'bp41':
|
761
|
+
2024Q3 2023Q3 2022Q3
|
762
|
+
value 7.082005e+07 5.377231e+07 6.201822e+07
|
763
|
+
YoY_1 NaN NaN 4.130744e-01
|
764
|
+
YoY_3 1.729171e-01 9.556684e-02 1.883274e-01
|
765
|
+
YoY_5 1.389090e-01 1.215242e-01 1.642914e-01
|
766
|
+
YoY_10 1.255138e-01 1.356297e-01 1.559702e-01,
|
767
|
+
'bp51':
|
768
|
+
2024Q3 2023Q3 2022Q3
|
769
|
+
value 3.111298e+09 3.173919e+09 2.453840e+09
|
770
|
+
YoY_1 NaN NaN 3.179539e-01
|
771
|
+
YoY_3 1.866752e-01 2.766851e-01 2.638677e-01
|
772
|
+
YoY_5 2.068132e-01 2.479698e-01 1.815106e-01
|
773
|
+
YoY_10 1.420500e-01 1.586797e-01 1.551364e-01
|
774
|
+
}
|
775
|
+
```
|
776
|
+
|
721
777
|
|
722
778
|
## 版本紀錄
|
779
|
+
## 0.0.16
|
780
|
+
- 處理ValueFetcher的error #issue76
|
781
|
+
|
782
|
+
- tej_fetcher新增 QOQ, YOY功能
|
783
|
+
|
723
784
|
## 0.0.15
|
724
785
|
- TechFetcher中新增指數條件
|
725
786
|
|
@@ -1,13 +1,3 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: neurostats_API
|
3
|
-
Version: 0.0.15
|
4
|
-
Summary: The service of NeuroStats website
|
5
|
-
Home-page: https://github.com/NeurowattStats/NeuroStats_API.git
|
6
|
-
Author: JasonWang@Neurowatt
|
7
|
-
Author-email: jason@neurowatt.ai
|
8
|
-
Requires-Python: >=3.6
|
9
|
-
Description-Content-Type: text/markdown
|
10
|
-
|
11
1
|
# neurostats_API
|
12
2
|
|
13
3
|
- [檔案架構](#檔案架構)
|
@@ -83,7 +73,7 @@ pip install neurostats-API
|
|
83
73
|
```Python
|
84
74
|
>>> import neurostats_API
|
85
75
|
>>> print(neurostats_API.__version__)
|
86
|
-
0.0.
|
76
|
+
0.0.16
|
87
77
|
```
|
88
78
|
|
89
79
|
### 得到最新一期的評價資料與歷年評價
|
@@ -685,21 +675,25 @@ fetcher = FinanceReportFetcher(
|
|
685
675
|
|
686
676
|
data = fetcher.get(
|
687
677
|
ticker = "2330" # 任意的股票代碼
|
688
|
-
fetch_mode = fetcher.
|
678
|
+
fetch_mode = fetcher.FetchMode.QOQ_NOCAL # 取得模式
|
689
679
|
start_date = "2005-01-01",
|
690
680
|
end_date = "2024-12-31",
|
691
681
|
report_type = "Q",
|
692
682
|
indexes = []
|
693
|
-
)
|
683
|
+
) # -> pd.DataFrame or Dict[pd.DataFrame]
|
694
684
|
```
|
695
685
|
- `ticker`: 股票代碼
|
696
686
|
|
697
687
|
- `fetch_mode` : 取得模式,為`fetcher.YOY_NOCAL` 或 `fetcher.QOQ_NOCAL`
|
698
|
-
- `YOY_NOCAL`: 以end_date為準,取得與end_date
|
688
|
+
- `YOY_NOCAL`: 以end_date為準,取得與end_date同季的歷年資料,時間範圍以start_date為起始
|
699
689
|
> 例如`start_date = "2020-07-01"`, `end_date = "2024-01-01"`,會回傳2020~2024的第一季資料
|
700
690
|
|
701
691
|
- `QOQ_NOCAL`: 時間範圍內的每季資料
|
702
692
|
|
693
|
+
- `QOQ`: 時間範圍內每季的每個index的數值以及QoQ
|
694
|
+
|
695
|
+
- `YoY`: 以end_date為準,取得與end_date同季的歷年資料以及成長率,時間範圍以start_date為起始
|
696
|
+
|
703
697
|
- `start_date`: 開始日期,不設定時預設為`2005-01-01`
|
704
698
|
|
705
699
|
- `end_date`: 結束日期,不設定時預設為資料庫最新資料的日期
|
@@ -716,10 +710,61 @@ data = fetcher.get(
|
|
716
710
|
請看 `會計師簽證財務資料`
|
717
711
|
|
718
712
|
#### 回傳資料
|
719
|
-
|
720
|
-
|
713
|
+
##### `YOY_NOCAL` 與 `QOQ_NOCAL`
|
714
|
+
為回傳`pd.DataFrame`,column名稱為<年份>Q<季>, row名稱為指定財報項目
|
715
|
+
```Python
|
716
|
+
# fetch_mode = fetcher.FetchMode.QOQ_NOCAL
|
717
|
+
2024Q3 2024Q2 2024Q1
|
718
|
+
bp41 7.082005e+07 6.394707e+07 5.761001e+07
|
719
|
+
bp51 3.111298e+09 3.145373e+09 3.091985e+09
|
720
|
+
|
721
|
+
# fetch_mode = fetcher.FetchMode.YOY_NOCAL
|
722
|
+
2024Q3 2023Q3 2022Q3
|
723
|
+
bp41 7.082005e+07 5.377231e+07 6.201822e+07
|
724
|
+
bp51 3.111298e+09 3.173919e+09 2.453840e+09
|
725
|
+
```
|
726
|
+
|
727
|
+
##### `YOY` 與 `QOQ`
|
728
|
+
回傳為`Dict[pd.DataFrame]`, key 為指定的index, DataFrame中則是該index歷年的數值與成長率
|
729
|
+
```Python
|
730
|
+
# fetch_mode = fetcher.FetchMode.QOQ
|
731
|
+
{
|
732
|
+
'bp41':
|
733
|
+
2024Q3 2024Q2 2024Q1
|
734
|
+
value 7.082005e+07 6.394707e+07 5.761001e+07
|
735
|
+
growth 1.074791e-01 1.099994e-01 5.532101e-03,
|
736
|
+
'bp51':
|
737
|
+
2024Q3 2024Q2 2024Q1
|
738
|
+
value 3.111298e+09 3.145373e+09 3.091985e+09
|
739
|
+
growth -1.083335e-02 1.726663e-02 -4.159542e-03
|
740
|
+
}
|
741
|
+
|
742
|
+
# fetch_mode = fetcher.FetchMode.YOY
|
743
|
+
{
|
744
|
+
'bp41':
|
745
|
+
2024Q3 2023Q3 2022Q3
|
746
|
+
value 7.082005e+07 5.377231e+07 6.201822e+07
|
747
|
+
YoY_1 NaN NaN 4.130744e-01
|
748
|
+
YoY_3 1.729171e-01 9.556684e-02 1.883274e-01
|
749
|
+
YoY_5 1.389090e-01 1.215242e-01 1.642914e-01
|
750
|
+
YoY_10 1.255138e-01 1.356297e-01 1.559702e-01,
|
751
|
+
'bp51':
|
752
|
+
2024Q3 2023Q3 2022Q3
|
753
|
+
value 3.111298e+09 3.173919e+09 2.453840e+09
|
754
|
+
YoY_1 NaN NaN 3.179539e-01
|
755
|
+
YoY_3 1.866752e-01 2.766851e-01 2.638677e-01
|
756
|
+
YoY_5 2.068132e-01 2.479698e-01 1.815106e-01
|
757
|
+
YoY_10 1.420500e-01 1.586797e-01 1.551364e-01
|
758
|
+
}
|
759
|
+
```
|
760
|
+
|
721
761
|
|
722
762
|
## 版本紀錄
|
763
|
+
## 0.0.16
|
764
|
+
- 處理ValueFetcher的error #issue76
|
765
|
+
|
766
|
+
- tej_fetcher新增 QOQ, YOY功能
|
767
|
+
|
723
768
|
## 0.0.15
|
724
769
|
- TechFetcher中新增指數條件
|
725
770
|
|
@@ -752,4 +797,4 @@ fetch_mode設定為`YOY_NOCAL`與`QOQ_NOCAL`下
|
|
752
797
|
- 處理銀行公司在finanace_overview會報錯誤的問題(未完全解決,因銀行公司財報有許多名稱不同,目前都會顯示為None)
|
753
798
|
|
754
799
|
### 0.0.9
|
755
|
-
- 更新指標的資料型態: 單位為日, %, 倍轉為字串
|
800
|
+
- 更新指標的資料型態: 單位為日, %, 倍轉為字串
|
@@ -7,10 +7,12 @@ from datetime import datetime, timedelta, date
|
|
7
7
|
from ..utils import StatsDateTime, StatsProcessor, YoY_Calculator
|
8
8
|
import yaml
|
9
9
|
|
10
|
+
|
10
11
|
class StatsFetcher:
|
12
|
+
|
11
13
|
def __init__(self, ticker, db_client):
|
12
14
|
self.ticker = ticker
|
13
|
-
self.db = db_client["company"]
|
15
|
+
self.db = db_client["company"] # Replace with your database name
|
14
16
|
self.collection = self.db["twse_stats"]
|
15
17
|
|
16
18
|
self.timezone = pytz.timezone("Asia/Taipei")
|
@@ -26,7 +28,6 @@ class StatsFetcher:
|
|
26
28
|
'grand_total_growth': [f"YoY_{i}" for i in [1, 3, 5, 10]]
|
27
29
|
}
|
28
30
|
|
29
|
-
|
30
31
|
def prepare_query(self):
|
31
32
|
return [
|
32
33
|
{
|
@@ -53,7 +54,9 @@ class StatsFetcher:
|
|
53
54
|
|
54
55
|
return StatsDateTime(date, year, month, day, season)
|
55
56
|
|
57
|
+
|
56
58
|
class BaseTEJFetcher(abc.ABC):
|
59
|
+
|
57
60
|
def __init__(self):
|
58
61
|
self.client = None
|
59
62
|
self.db = None
|
@@ -62,25 +65,22 @@ class BaseTEJFetcher(abc.ABC):
|
|
62
65
|
@abc.abstractmethod
|
63
66
|
def get(self):
|
64
67
|
pass
|
65
|
-
|
68
|
+
|
66
69
|
def get_latest_data_time(self, ticker):
|
67
|
-
latest_data = self.collection.find_one(
|
68
|
-
{"ticker": ticker},
|
69
|
-
{"last_update": 1, "_id" : 0}
|
70
|
-
)
|
70
|
+
latest_data = self.collection.find_one({"ticker": ticker}, {"last_update": 1, "_id": 0})
|
71
71
|
|
72
72
|
try:
|
73
73
|
latest_date = latest_data['last_update']["latest_data_date"]
|
74
74
|
except Exception as e:
|
75
75
|
latest_date = None
|
76
|
-
|
76
|
+
|
77
77
|
return latest_date
|
78
78
|
|
79
|
-
def cal_YoY(self, data_dict: dict, start_year: int, end_year: int):
|
80
|
-
year_shifts = [1,3,5,10]
|
79
|
+
def cal_YoY(self, data_dict: dict, start_year: int, end_year: int, season: int):
|
80
|
+
year_shifts = [1, 3, 5, 10]
|
81
81
|
return_dict = {}
|
82
|
-
for year in range(start_year, end_year+1):
|
83
|
-
year_data = data_dict[
|
82
|
+
for year in range(start_year, end_year + 1):
|
83
|
+
year_data = data_dict[f"{year}Q{season}"]
|
84
84
|
year_keys = list(year_data.keys())
|
85
85
|
for key in year_keys:
|
86
86
|
if (key in 'season'):
|
@@ -93,23 +93,20 @@ class BaseTEJFetcher(abc.ABC):
|
|
93
93
|
this_value = year_data[key]
|
94
94
|
try:
|
95
95
|
past_year = str(year - shift)
|
96
|
-
last_value = data_dict[past_year][key]
|
97
|
-
temp_dict[f"YoY_{shift}"] = YoY_Calculator.cal_growth(
|
98
|
-
this_value, last_value, delta = shift
|
99
|
-
)
|
96
|
+
last_value = data_dict[f"{past_year}Q{season}"][key]
|
97
|
+
temp_dict[f"YoY_{shift}"] = YoY_Calculator.cal_growth(this_value, last_value, delta=shift)
|
100
98
|
except Exception as e:
|
101
99
|
temp_dict[f"YoY_{shift}"] = None
|
102
|
-
|
100
|
+
|
103
101
|
year_data[key] = temp_dict
|
104
102
|
|
105
103
|
else:
|
106
104
|
year_data.pop(key)
|
107
|
-
|
108
|
-
return_dict[year] = year_data
|
109
|
-
|
110
|
-
|
105
|
+
|
106
|
+
return_dict[f"{year}Q{season}"] = year_data
|
107
|
+
|
111
108
|
return return_dict
|
112
|
-
|
109
|
+
|
113
110
|
def cal_QoQ(self, data_dict):
|
114
111
|
return_dict = {}
|
115
112
|
for i, time_index in enumerate(data_dict.keys()):
|
@@ -122,7 +119,7 @@ class BaseTEJFetcher(abc.ABC):
|
|
122
119
|
else:
|
123
120
|
last_year = year
|
124
121
|
last_season = season - 1
|
125
|
-
|
122
|
+
|
126
123
|
this_data = data_dict[time_index]
|
127
124
|
this_keys = list(this_data.keys())
|
128
125
|
for key in this_keys:
|
@@ -137,16 +134,21 @@ class BaseTEJFetcher(abc.ABC):
|
|
137
134
|
try:
|
138
135
|
last_value = data_dict[f"{last_year}Q{last_season}"][key]['value']
|
139
136
|
|
140
|
-
temp_dict['growth'] = YoY_Calculator.cal_growth(
|
141
|
-
this_value, last_value, delta=1
|
142
|
-
)
|
137
|
+
temp_dict['growth'] = YoY_Calculator.cal_growth(this_value, last_value, delta=1)
|
143
138
|
except Exception as e:
|
144
139
|
temp_dict['growth'] = None
|
145
|
-
|
140
|
+
|
146
141
|
this_data[key] = temp_dict
|
147
142
|
|
148
143
|
else:
|
149
144
|
this_data.pop(key)
|
150
145
|
return_dict[time_index] = this_data
|
151
146
|
return return_dict
|
152
|
-
|
147
|
+
|
148
|
+
def get_dict_of_df(self, data_dict):
|
149
|
+
"""
|
150
|
+
dict[dict] -> dict[df]
|
151
|
+
"""
|
152
|
+
for key in data_dict.keys():
|
153
|
+
data_dict[key] = pd.DataFrame.from_dict(data_dict[key])
|
154
|
+
return data_dict
|