Edit ark_model to get rid of added columns from the json repsonse (#586)

* Edit ark_model to get rid of added columns from the json repsonse

* Figure out the mock response.  Add ./tests to codespell lineting to avoid all the issues iwth company names...
This commit is contained in:
jmaslek
2021-08-02 09:37:38 -04:00
committed by GitHub
parent 19b1d27424
commit 5337f615b9
3 changed files with 641 additions and 775 deletions

View File

@@ -40,16 +40,31 @@ def get_ark_orders() -> DataFrame:
df_orders.drop(
[
"everything",
"everything.profile.customThumbnail",
"hidden",
"images.thumbnail",
"cusip",
"estimated_price",
"updated_at",
"created_at",
"region",
"country",
"isADR",
"companyName",
"clinicalTrialsSearchHandle",
"wasSPACBuy",
"currencyMultiplier",
"useRapidAPI",
"description",
"quandlTicker",
"customThumbnail",
"custom_thumbnail",
"id",
],
axis=1,
inplace=True,
)
df_orders["date"] = pd.to_datetime(df_orders["date"], format="%Y-%m-%dZ").dt.date
df_orders["date"] = pd.to_datetime(df_orders["date"], format="%Y-%m-%d").dt.date
return df_orders

View File

@@ -75,7 +75,7 @@ def ark_orders_view(other_args: List[str]):
df_orders = ark_model.get_ark_orders()
if df_orders.empty:
print("The ARK orders aren't anavilable at the moment.\n")
print("The ARK orders aren't available at the moment.\n")
return
pd.set_option("mode.chained_assignment", None)

File diff suppressed because one or more lines are too long