Skip to content

Commit

Permalink
Change type of function
Browse files Browse the repository at this point in the history
  • Loading branch information
dgunning committed Nov 10, 2024
1 parent ca6bbc9 commit 2071e5f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion edgar/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ def __repr__(self):
f'zipcode="{self.zipcode or ""}", state_or_country="{self.state_or_country}")'
)

def to_json(self):
return {
'street1': self.street1,
'street2': self.street2,
'city': self.city,
'state_or_country': self.state_or_country,
'zipcode': self.zipcode,
'state_or_country_desc': self.state_or_country_desc
}


class Fact:

Expand Down Expand Up @@ -1023,7 +1033,7 @@ def create_fact(row) -> Fact:
unit=row.unit
)

def latest(self) -> List[Fact]:
def latest(self) -> pd.DataFrame:
return (self.data
.assign(cnt=self.data.groupby(['unit']).cumcount())
.query("cnt==0")
Expand Down

0 comments on commit 2071e5f

Please sign in to comment.