I have a problem with looking for gaps in my pandas dataframe.
So I have this data in my df:
| date | name | score |
|---|---|---|
| 2020-01-01 | FEAT_1 | 0.64 |
| 2020-01-01 | FEAT_2 | 0.17 |
| 2020-01-01 | FEAT_3 | 0.09 |
| 2020-01-01 | FEAT_4 | 0.07 |
| 2020-01-01 | FEAT_5 | 0.03 |
| 2020-01-02 | FEAT_1 | 0.90 |
| 2020-01-02 | FEAT_2 | 0.30 |
| 2020-01-02 | FEAT_3 | 0.20 |
| 2020-01-02 | FEAT_4 | 0.10 |
| 2020-01-02 | FEAT_6 | 0.02 |
And what I want to do is to fill rows for dates that miss some FEAT_N. So, for example 2020-01-01 has feat1,2,3,4,5 but doesn't have feat_6 and I would like to put there new row with same date, feat_6 as name and score = 0. FEAT_N are .unique() values of column feature_name
I don't know how to deal with this problem. My main problem is that I don't know how to find if certain date in date column has FEAT_N value.
Thanks guys.