Skip to content

Commit

Permalink
Merge pull request #265 from nicomon24/master
Browse files Browse the repository at this point in the history
Updating `CryptoDataDownload()` to sync with current CSV
  • Loading branch information
mwbrulhardt committed Dec 20, 2020
2 parents af960a9 + 870ae06 commit d760abe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensortrade/data/cdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ def fetch_default(self,

df = pd.read_csv(self.url + filename, skiprows=1)
df = df[::-1]
df = df.drop(["Symbol"], axis=1)
df = df.drop(["symbol"], axis=1)
df = df.rename({base_vc: new_base_vc, quote_vc: new_quote_vc, "Date": "date"}, axis=1)

if "d" in timeframe:
df["date"] = pd.to_datetime(df["date"])
elif "h" in timeframe:
df["date"] = pd.to_datetime(df["date"], format="%Y-%m-%d %I-%p")
df["date"] = pd.to_datetime(df["date"], format="%Y-%m-%d %H:%M:%S")

df = df.set_index("date")
df.columns = [name.lower() for name in df.columns]
Expand Down

0 comments on commit d760abe

Please sign in to comment.