Skip to content

Commit 5b5cddc

Browse files
author
deeleeramone
committed
ty
1 parent 066cd98 commit 5b5cddc

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

openbb_platform/providers/sec/openbb_sec/models/company_filings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def transform_data(
264264
) -> list[SecCompanyFilingsData]:
265265
"""Transform the data."""
266266
from numpy import nan
267-
from pandas import NA, DataFrame, to_datetime
267+
from pandas import NA, DataFrame, Index, to_datetime
268268

269269
if not data:
270270
raise EmptyDataError(
@@ -286,7 +286,7 @@ def transform_data(
286286
"isXBRL",
287287
"size",
288288
]
289-
filings = DataFrame(data, columns=cols).astype(str)
289+
filings = DataFrame(data, columns=Index(cols)).astype(str)
290290
filings["reportDate"] = to_datetime(filings["reportDate"]).dt.date
291291
filings["filingDate"] = to_datetime(filings["filingDate"]).dt.date
292292
filings = filings.sort_values(by=["filingDate", "reportDate"], ascending=False)

openbb_platform/providers/sec/openbb_sec/models/nport_disclosure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ async def aextract_data(
283283
).date()
284284
# Gets the URL for the nearest date to the requested date.
285285
__dates = Series(to_datetime(dates))
286-
__date = to_datetime(date)
286+
__date = to_datetime(str(date))
287287
__nearest = DataFrame(__dates - __date)
288288
__nearest_date = abs(__nearest[0].astype("int64")).idxmin()
289289
new_date = __dates[__nearest_date].strftime("%Y-%m-%d")

openbb_platform/providers/sec/validate_corpus.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import time
2424
from concurrent.futures import ProcessPoolExecutor, as_completed
2525
from pathlib import Path
26+
from typing import Any
2627

2728
import requests
2829

@@ -1104,7 +1105,7 @@ def validate_one(cik: str, name: str, facts_json: dict) -> dict:
11041105
11051106
Returns a dict summarizing the results.
11061107
"""
1107-
result = {
1108+
result: dict[str, Any] = {
11081109
"cik": cik,
11091110
"name": name,
11101111
"entity_name": facts_json.get("entityName", ""),

0 commit comments

Comments
 (0)