edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

Unhashable type Series for filings xbrl

Open firmai opened this issue 3 years ago • 6 comments

After running the following code


from edgar import get_filings, Filings, Filing, get_company, set_identity, Company

set_identity('Isla Sthiss [email protected]')

forms = ['10-Q',"10-K","10-K/A","10-Q/A"]

filings = get_filings(range(2013, 2024), form=forms)
file_10k = filings.filter(form="10-K", amendments=True) 
filing = filings[3]
filing.homepage
filing_xbrl = filing.xbrl()

TypeError: unhashable type: 'Series'

TypeError: unhashable type: 'Series' image

Here you have an interactive notebook to reproduce the error: https://colab.research.google.com/drive/12m_ohER2LGLe0khppGeKyqoqUkMLh_Ks?usp=sharing

firmai avatar Feb 07 '23 14:02 firmai

What is your version of edgartools

!pip install edgartools OR pip install edgartools

Can you tell me which filing has the issues .. print the filing or get the accession number

dgunning avatar Feb 07 '23 17:02 dgunning

Reproduced on colab.

Some online code environments like colab have a problem running pandas query expressions e.g. df.query(query) which by default uses the numexr engine, particularly if the expression is complex

The fix is to change to df.query(query, engine='python'). Alternatively, don't use query, but the regular df[df.col==] expression instead

I will change and release a new version.

But also, I have to do a more testing on colab

dgunning avatar Feb 08 '23 00:02 dgunning

Made a couple of patches. Fixed in 1.10.3

dgunning avatar Feb 08 '23 02:02 dgunning

Tested on Colab See https://github.com/dgunning/edgartools/blob/main/Usage.ipynb

dgunning avatar Feb 08 '23 13:02 dgunning

Fixed

dgunning avatar Feb 10 '23 15:02 dgunning

Fixed

dgunning avatar Feb 10 '23 15:02 dgunning