Skip to content

Commit

Permalink
update should take kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
realiti4 committed Apr 22, 2021
1 parent 98143fe commit c840dbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tradingfeatures/api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def get_hist(self,

return df

def update(self, path):
def update(self, path, **kwargs):
# assert os.path.exists(path), "path doesn't exists!"
if not os.path.exists(path): # Disabled
assert '.csv' in path, "Not a valid .csv location!"
Expand All @@ -161,7 +161,7 @@ def update(self, path):
df = pd.read_csv(path, index_col=0)

last_timestamp = df.index[-1]
updates = self.get_hist(start=last_timestamp)
updates = self.get_hist(start=last_timestamp, **kwargs)

df_final = pd.concat([df, updates])
df_final = df_final[~df_final.index.duplicated(keep='first')]
Expand Down

0 comments on commit c840dbb

Please sign in to comment.