Skip to content

Commit

Permalink
Fixed empty ledger issue in get_df (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
sameer-639 authored Apr 15, 2024
1 parent d23fac3 commit 5d154be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyluca/ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ def get_ledger(self) -> List[dict]:

def get_df(self) -> pd.DataFrame:
ledger_df = pd.DataFrame(self.get_ledger())
ledger_df.drop(columns=['balance'], inplace=True)
if not ledger_df.empty:
ledger_df.drop(columns=['balance'], inplace=True)
ledger_df['account_name'] = ledger_df['account'].apply(lambda x: self.config['accounts'][x].get('name', x))
return ledger_df

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setuptools.setup(
name='pyluca',
version='3.1.0',
version='3.1.1',
author='datasignstech',
author_email='[email protected]',
description='Double entry accounting system',
Expand Down

0 comments on commit 5d154be

Please sign in to comment.