Skip to content

Commit

Permalink
Merge pull request #47 from isaacharrisholt/iss44
Browse files Browse the repository at this point in the history
Fix documentation left over from V1 and some docstrings
  • Loading branch information
isaacharrisholt authored Feb 4, 2023
2 parents feaca62 + ddd9898 commit 08d8b22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Usage

Here's an example parsing of a QIF file:

>>> from quiffen import Qif
>>> from quiffen import Qif, QifDataType
>>> import decimal
>>> qif = Qif.parse('test.qif', day_first=False)
>>> qif.accounts
Expand All @@ -54,7 +54,7 @@ Transaction:
>>> print(bills.render_tree())
Bills (root)
└─ Cell Phone
>>> df = qif.to_dataframe(data='transactions')
>>> df = qif.to_dataframe(data_type=QifDataType.TRANSACTIONS)
>>> df.head()
date amount payee ... memo cleared check_number
0 2020-02-14 67.5 T-Mobile ... NaN NaN NaN
Expand All @@ -76,7 +76,7 @@ And here's an example of creating a QIF structure and exporting to a QIF file:
>>> groceries.add_child(essentials)
>>> qif.add_category(groceries)
>>> tr = quiffen.Transaction(date=datetime.now(), amount=150.0)
>>> acc.add_transaction(tr, header='Bank')
>>> acc.add_transaction(tr, header=quiffen.AccountType.BANK)
>>> qif.to_qif() # If a path is provided, this will save the file too!
'!Type:Cat\nNGroceries\nETrue\nIFalse\n^\nNGroceries:Essentials\nETrue\nIFalse\n^\n!Account\nNPersonal Bank Account\nDMy
personal bank account with Barclays.\n^\n!Type:Bank\nD02/07/2021\nT150.0\n^\n'
Expand Down
4 changes: 0 additions & 4 deletions quiffen/core/qif.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ def to_csv(
def to_dataframe(
self,
data_type: QifDataType = QifDataType.TRANSACTIONS,
# date_format: str = '%Y-%m-%d',
ignore: List[str] = None,
) -> pd.DataFrame:
"""Convert part of the Qif object to a Pandas DataFrame. The
Expand All @@ -524,9 +523,6 @@ def to_dataframe(
data_type : QifDataType, optional
The type of data to convert to a DataFrame, by default
QifDataType.TRANSACTIONS
date_format : str, optional
The date format to use when converting dates to strings, by
default '%Y-%m-%d'
ignore : List[str], optional
A list of fields to ignore when converting to a DataFrame, by
default None
Expand Down

0 comments on commit 08d8b22

Please sign in to comment.