I have these 2 dataframes
dffouten:
                     index          opmerking
DateTime                                     
2018-11-01 08:05:41     20         photocells
2018-11-01 11:40:55     42  trap/roodnoodstop
2018-11-02 07:24:02     62  trap/roodnoodstop
and
dffm:
                      Counter
traploopext             4
What i want to do is divide the amount of times trap/noodstop by the traploopext and countervalue of 4
so what I did is:
dffouten = dffouten.groupby('opmerking').count()
which gives me
                   index
opmerking               
photocells             1
trap/roodnoodstop      2
and then
percentage = (dffm.loc['rectloopext'] / dffouten.loc['trap/roodnoodstop']) * 100
but this doesnt work, the strange thing to me is that if use :
percentage = (dffm.loc['rectloopext'] / 2) * 100
that it gives me the answer.
 
    