ChrisRBe/PP-P2P-Parser

Out of date

Opened this issue · 6 comments

Does not support the new updated structure of Mintos CSV export

Hi @smith558,

I am not actively using Mintos anymore, could you provide an updated account statement csv or create a PR to update the config ./config/mintos.yml?

flod1 commented

Hello, the problem is that the parser does not recognize the comma when I make a german export from mintos.

Input Format:
0.0014609971384316

Output format:
0.0014609970

where can I configure in the PP parser that it should set a simicolon as a separator instead of a comma?

another problem, in current mintos file, the tax value

Hi @flod1,

hmm... Good question. Since I don't have an up to date mintos export I can't really check myself.

That being said:

  • Reading the mintos statement is happening here using the csv.Sniffer to guess the input format, including delimiter.
  • The read value will be parsed and mutilated in the statement class to check what format it is (. or , decimal delimiter) here
  • At the moment, PP parser outputs the file in the default excel dialect here

Now, the question is what you actually would like to get on the output side.

The output format of the csv file with respect to the decimal delimiter handling is currently rather inflexible.
Changing the output csv delimiter should be fairly easy for you to achieve locally by adding the delimiter = "," as an additional parameter to the csv.DictWriter instantiation

Could you please elaborate on the tax value issues?

In general, I am toying since quite some time with the idea to refactor the whole parsing and writing functionality. It might be that using pandas/numpy might be better suited to handling this kind of transformation especially with the different csv input formats wrt decimal delimiter and output format.

I might look into this in the future, currently not able to open a PR any time soon.

Exported from Mintos on 23/02/2023: 2-months-account-statement.csv
Mintos statement summary as generated on the website for the exported selection (above):

Summary Statement EUR  
Opening balance 01.12.2022 23.78
Deposits +1 758.12
Investment -2 649.80
Principal received +303.50
Interest received +47.27
Late fees received +0.02
Secondary market transaction +41.01
Secondary market fee -2.95
Principal received from loan repurchase +496.54
Interest received from loan repurchase +6.60
Secondary market transaction - discount or premium -0.44
Withholding tax -2.69
Closing balance 31.01.2023 20.96

Okay, taxes require an additional type_regex entry in the yaml file, additional handling in the statements and parser classes. Including handling of the absence of the same in other cases/config files.
Plus adaptation of the tests.

@ChrisRBe updated my comment above (careful, by balance they mean the cash reserve not account value)