Skip to content
This repository was archived by the owner on Jun 12, 2019. It is now read-only.

Commit 5a5cce7

Browse files
Merge branch 'th_hotfix' of github.com:MetisMachine/bitcoinRNN.template into th_hotfix
2 parents fee23e3 + 256e444 commit 5a5cce7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

main.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@
4848
print("Validating a single record:", flush=True)
4949
print(gtrends_json['data'][0], flush=True)
5050

51-
# Convert to pandas df
52-
gtrends = pd.DataFrame.from_records(gtrends_json['data']) .pivot(index='date', values='interest', columns='keyword')
51+
# Convert to pandas df and handles string NaN's coming through data engine
52+
gtrends = pd.DataFrame.from_records(gtrends_json['data'])\
53+
.pivot(index='date', values='interest', columns='keyword')\
54+
.replace({'NaN': None})\
55+
.fillna(method='pad')
5356

5457
# Set proper date format
5558
gtrends.index = pd.to_datetime(gtrends.index)

0 commit comments

Comments
 (0)