-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi Team Glassnode,
When retrieving API with multiple columns, the column name is 'o' not 'v'.
(e.g : https://api.glassnode.com/v1/metrics/supply/hodl_waves)
And it cannot be retrieved properly with current API connector.
I have added below code to fix the problem, but the iterator make the whole process quite slow...
try:
df = pd.DataFrame(json.loads(r.text))
df = df.set_index('t')
df.index = pd.to_datetime(df.index, unit='s')
df = df.sort_index()
s = pd.DataFrame()
for r, c in df.iterrows():
for k, v in c['o'].items():
s.loc[r, k] = v
return s
except Exception as e:
print(e)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels