Skip to content
This repository was archived by the owner on Dec 9, 2022. It is now read-only.

'dict' object has no attribute 'head' #16

Open
soroushosanlou opened this issue Jan 31, 2022 · 4 comments
Open

'dict' object has no attribute 'head' #16

soroushosanlou opened this issue Jan 31, 2022 · 4 comments

Comments

@soroushosanlou
Copy link

Issues
it says "'dict' object has no attribute 'head'"
could you please help me?

@pallavimitra
Copy link

It is returning dict instead of a dataframe.
You can covert this dictionary to dataframe as follows:
markets_df = messari.get_all_markets()
markets_df = pd.DataFrame(markets_df['data'])
markets_df.head()

@xyang-algotune
Copy link

seems like this is fixed..? I just tried, it seems to return DF

@devin-black
Copy link

I had this same issue and was able to fix just now.
Originally I had installed this with pip install messari — then I got this error (and others)

However, the above code works as intended, returning a dataframe, when I install via pip install git+https://github.com/messari/messari-python-api.git.

So my guess is that it's an older version being installed with pip install messari?

@allenvalter
Copy link

I had the same experience; when I used pip3 install messari, it downloaded the 0.0.1 version of the package; I used pip3 install messari --upgrade and it downloaded the newest 1.0 version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants