sleepStats.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:fitbit-analyzer 作者: 5agado 项目源码 文件源码
def normalizedIntradayCountStats(intradayStats, limitCount=5):
    # For each minute, number of days for which we have a valid measure (record)
    notNullCount = intradayStats.count()
    # Ignore minutes where we have low level of records
    notNullCount[notNullCount < limitCount] = None
    # Count how many times each value appears for each minute
    valueCount = intradayStats.apply(pd.value_counts)
    # Normalize each minute by records count
    res = valueCount.div(notNullCount, axis=1)
    return res
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号