mini-kep / parser-rosstat-kep

Provide clean macroeconomic time series as CSV files at stable URL
12 stars 13 forks source link

Missing values should not be False at dataframe construction #154

Closed epogrebnyak closed 6 years ago

epogrebnyak commented 6 years ago

After pasring in Vintage we have

self.dfs['q'].loc["2017-12-31", "GDP_yoy"] == False

This is an error, should be a missing value.

epogrebnyak commented 6 years ago

False appears for example in https://github.com/mini-kep/parser-rosstat-kep/blob/dev/data/processed/2017/12/dfq.csv

2017-12-31,2017,4,False,False,False,False,False,False,False,False,False,-21679.7,-11191.2,-7080.8,-22069.0,-10971.5,-7584.3,219.8,-503.5,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False
liepieshov commented 6 years ago

In parser.py line 189 you use the function to_float with argument "", which returns False

epogrebnyak commented 6 years ago

Test nededed:

https://github.com/mini-kep/parser-rosstat-kep/blob/3de737c26d948d10bbb11c5ddc2f12bc706c6bb8/src/kep/csv2df/parser.py#L193-L200

epogrebnyak commented 6 years ago

And another test needed:

https://github.com/mini-kep/parser-rosstat-kep/blob/3de737c26d948d10bbb11c5ddc2f12bc706c6bb8/src/kep/csv2df/parser.py#L113-L119

liepieshov commented 6 years ago

160 @epogrebnyak , both Done