finbrain-python 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- finbrain/endpoints/app_ratings.py +14 -0
- {finbrain_python-0.3.0.dist-info → finbrain_python-0.3.1.dist-info}/METADATA +1 -1
- {finbrain_python-0.3.0.dist-info → finbrain_python-0.3.1.dist-info}/RECORD +6 -6
- {finbrain_python-0.3.0.dist-info → finbrain_python-0.3.1.dist-info}/WHEEL +0 -0
- {finbrain_python-0.3.0.dist-info → finbrain_python-0.3.1.dist-info}/licenses/LICENSE +0 -0
- {finbrain_python-0.3.0.dist-info → finbrain_python-0.3.1.dist-info}/top_level.txt +0 -0
|
@@ -148,6 +148,12 @@ class AppRatingsAPI:
|
|
|
148
148
|
publish many apps (Apple has 140 on iOS) and which of them matters
|
|
149
149
|
is your judgement, not ours.
|
|
150
150
|
|
|
151
|
+
Either frame carries a ``cik`` column: the company's SEC Central
|
|
152
|
+
Index Key, a 10-digit zero-padded string (leading zeros are data),
|
|
153
|
+
``None`` for an issuer with no SEC registration. It is one value
|
|
154
|
+
per company, repeated down the frame, so a frame can be joined to
|
|
155
|
+
the other FinBrain datasets on the entity rather than the symbol.
|
|
156
|
+
|
|
151
157
|
Returns
|
|
152
158
|
-------
|
|
153
159
|
dict | pandas.DataFrame
|
|
@@ -165,6 +171,12 @@ class AppRatingsAPI:
|
|
|
165
171
|
data = self._c._request("GET", path, params=params)
|
|
166
172
|
|
|
167
173
|
if as_dataframe:
|
|
174
|
+
# One value per company, so it is a constant column rather than a
|
|
175
|
+
# per-row field. Assigned after the flatten so the flatten stays a
|
|
176
|
+
# pure function of the rows it is given. Kept as an object column:
|
|
177
|
+
# a numeric dtype would eat the leading zeros.
|
|
178
|
+
cik = data.get("cik")
|
|
179
|
+
|
|
168
180
|
if per_app:
|
|
169
181
|
flat = _flatten_apps(data.get("apps") or [])
|
|
170
182
|
df = pd.DataFrame(flat)
|
|
@@ -174,6 +186,7 @@ class AppRatingsAPI:
|
|
|
174
186
|
# row per app, so a date index would not be unique.
|
|
175
187
|
df.sort_values(["app_id", "date"], inplace=True)
|
|
176
188
|
df.reset_index(drop=True, inplace=True)
|
|
189
|
+
df["cik"] = cik
|
|
177
190
|
return df
|
|
178
191
|
|
|
179
192
|
rows: List[Dict[str, Any]] = data.get("data", [])
|
|
@@ -182,6 +195,7 @@ class AppRatingsAPI:
|
|
|
182
195
|
if not df.empty and "date" in df.columns:
|
|
183
196
|
df["date"] = pd.to_datetime(df["date"])
|
|
184
197
|
df.set_index("date", inplace=True)
|
|
198
|
+
df["cik"] = cik
|
|
185
199
|
return df
|
|
186
200
|
|
|
187
201
|
return data
|
|
@@ -27,7 +27,7 @@ finbrain/aio/endpoints/sentiments.py,sha256=BXFT0jr5j0MnB65MXGxZK36BJLXMTuggkFF9
|
|
|
27
27
|
finbrain/endpoints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
finbrain/endpoints/_utils.py,sha256=wY8SKthpVernWlKwZfWoM8zZtQ3GS_hBQioH1Fk7RK4,1190
|
|
29
29
|
finbrain/endpoints/analyst_ratings.py,sha256=6q_tecgnbzXn2wLSWqHNUa9MbLcybTD7xEBAkUyGPR0,2218
|
|
30
|
-
finbrain/endpoints/app_ratings.py,sha256=
|
|
30
|
+
finbrain/endpoints/app_ratings.py,sha256=RIXjLaT40rc3Y4ezklNETtYz6SK9n4xxBIBYCFA1IMo,7067
|
|
31
31
|
finbrain/endpoints/available.py,sha256=3cXjDK1qE38RHAfQ2C14oD7l7dR8mhDtUcva3LzlK5s,3911
|
|
32
32
|
finbrain/endpoints/corporate_lobbying.py,sha256=K4jFcgx2_PqxFSlSm2E0rxuunl7FjWEwk_S4nfjsMuw,2213
|
|
33
33
|
finbrain/endpoints/government_contracts.py,sha256=jb96byPNK32AsEQWgCHMU7kAue9BFC539TH10JGfY7I,2343
|
|
@@ -43,8 +43,8 @@ finbrain/endpoints/reddit_mentions.py,sha256=WiePVAyUbA0VpWOd22M2YTlDWOQITp8qUBr
|
|
|
43
43
|
finbrain/endpoints/screener.py,sha256=vyay_g0OMfndmJc8UWBmxaHafp6grl7UqVdbMNTqJTc,11704
|
|
44
44
|
finbrain/endpoints/senate_trades.py,sha256=qtpuGe_M3dE2vVsol9R6bw1Xqt7XY2rHVrf6ElTc4wE,4484
|
|
45
45
|
finbrain/endpoints/sentiments.py,sha256=sGGPaxzGGFvMOaYv3VSCmnG7H9v7OVlX7Vsndct8jhA,2606
|
|
46
|
-
finbrain_python-0.3.
|
|
47
|
-
finbrain_python-0.3.
|
|
48
|
-
finbrain_python-0.3.
|
|
49
|
-
finbrain_python-0.3.
|
|
50
|
-
finbrain_python-0.3.
|
|
46
|
+
finbrain_python-0.3.1.dist-info/licenses/LICENSE,sha256=x71LjIUPbK7Y8YBulH_AXzEIX7BK90dgFL2zA6LBT-A,1069
|
|
47
|
+
finbrain_python-0.3.1.dist-info/METADATA,sha256=tbC9e-BNnFK4TkGUVWXxvyN6_AlUuEy72OGTC3noPgQ,24211
|
|
48
|
+
finbrain_python-0.3.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
49
|
+
finbrain_python-0.3.1.dist-info/top_level.txt,sha256=dCiQtTx3z2TtO_yQI6q3yODcdb-pABB-iEReJegVAv0,9
|
|
50
|
+
finbrain_python-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|