dgunning / edgartools

Navigate SEC Edgar data in Python
MIT License
522 stars 104 forks source link

how to loop over statement #151

Open onthegit opened 1 week ago

onthegit commented 1 week ago

Hello, I am new to python, and I was wondering how to loop over Statement and get the label, concept, ,value, and name (e.g us-gaap:DebtInstrumentCarryingAmount) ? Is this possible with this library?

dgunning commented 1 week ago

You can use statement.get_dataframe() and loop over the dataframe rows

df = income_statement.get_dataframe()
for row in df.iterrows():
    print(row)
onthegit commented 3 days ago

@dgunning thanks. it looks like the row does not contain the dimensions and other attributes. Is there a way to get them while looping over statements? Thank you.