s-leroux / fin

Set of tools for personal investment
MIT License
1 stars 0 forks source link

`Serie.from_csv()` should warn if a cell does not contain valid data #43

Open s-leroux opened 7 months ago

s-leroux commented 7 months ago

Serie.from_csv() should warn if a cell does not contain valid data.

Maybe Serie.from_data() should do the same.

https://github.com/s-leroux/fin/blob/d79b4f04c451fdb041899af4f4f0dbcc33c80ee4/fin/seq/serie.pyx#L156-L182

Optionally, we may consider adding a keyword parameter to specify the authorized "n/a" values that will be converted to None/NaN.

s-leroux commented 6 months ago

An idea would be to somehow return a list of "suspicious rows"—possibly with details. After, it is the caller's responsibility to keep those rows or discard them.

We may use the same strategy when loading data from fin.api