I haven't used csv.py in a while, but use beancount_reds_importers 
<https://github.com/redstreet/beancount_reds_importers> (I'm the author).

If your fidelity csv file looks like this 
<https://github.com/redstreet/beancount_reds_importers/blob/fidelity_csv/beancount_reds_importers/fidelity_csv/History_for_Account_X99999999.csv>,
 
then the fidelity_csv 
<https://github.com/redstreet/beancount_reds_importers/blob/57d25f99921e2ba70b8131ffe4dcccfbc83a6328/beancount_reds_importers/fidelity_csv>
 
importer in beancount_reds_importers 
<https://github.com/redstreet/beancount_reds_importers> should work for 
you. It is under development, but should work for the most part (might be 
missing a few transaction_type_maps). It already has "skip_tail_rows 
<https://github.com/redstreet/beancount_reds_importers/blob/57d25f99921e2ba70b8131ffe4dcccfbc83a6328/beancount_reds_importers/fidelity_csv/__init__.py#L18>"
 
in its config.

Easiest way to install, if you're interested is:
pip3 install 
git+https://github.com/redstreet/beancount_reds_importers.git@fidelity_csv

Hope that helps.
On Thursday, June 2, 2022 at 10:08:15 PM UTC-7 [email protected] wrote:

> Hey all - CSVs downloaded from Fidelity not only start with some rows to 
> skip but they end in about 11 garbage rows.
>
> I think there's probably a clean solution of adding a skip_last_lines that 
> leverages the existing skip_lines logic (from csv.py)
>
> Anyone know if something like this has been done anywhere? I'm not 
> comfortable enough with csv.py to try to implement that from scratch
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/de7f72e4-5155-409f-96ee-83c53d9a574fn%40googlegroups.com.

Reply via email to