signaux-faibles / predictsignauxfaibles

Dépôt du code python permettant la production de liste de prédiction Signaux Faibles.
MIT License
6 stars 1 forks source link

fix: fill missing fields after fetching data #62

Closed vviers closed 3 years ago

vviers commented 3 years ago
> $ ipython
Python 3.6.8 (default, Feb 17 2021, 16:19:03) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: %config Completer.use_jedi = False

In [2]: from predictsignauxfaibles.data import SFDataset

In [3]: dataset = SFDataset(fields = ["outcome", "column_that_doesnt_exist", "ca"], sample_size=10)

In [4]: dataset.fetch_data()
Out[4]: 

Signaux Faibles Dataset
----------------------------------------------------
   outcome       ca  column_that_doesnt_exist
0    False  81513.0                       NaN
1     True   4892.0                       NaN
2    False      NaN                       NaN
3    False      NaN                       NaN
4    False      NaN                       NaN
[...]
----------------------------------------------------
Number of observations = 10

closes #43