Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation left over from V1 and some docstrings #47

Merged
merged 1 commit into from
Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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