dgunning / edgartools

Python library for working with SEC Edgar
MIT License
345 stars 74 forks source link

Unhashable type Series for filings xbrl #5

Closed firmai closed 1 year ago

firmai commented 1 year ago

After running the following code


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

set_identity('Isla Sthiss islasa@gmail.com')

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

dgunning commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Made a couple of patches. Fixed in 1.10.3

dgunning commented 1 year ago

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

dgunning commented 1 year ago

Fixed

dgunning commented 1 year ago

Fixed