alteryx / alteryx/featuretools
Feature Group by Time
未关闭
needs design
new feature
- 主要语言
- Python
- 星标
- 7.7k
- 派生
- 915
- PR 合并指标
- 30 天内没有已合并 PR
描述
Currently, there isn't a direct way to aggregate features by time intervals. For example, given this dataset of transactions, an expected output can be the total amount on each day.
```
ID Amount Time
0 1.5 2020-06-02 19:06:40.012210
1 5.0 2020-06-02 10:06:40.012241
2 2.3 2020-06-02 09:06:40.012252
3 6.0 2020-06-01 18:06:40.012261
4 9.0 2020-06-01 13:06:40.012271
5 3.0 2020-06-01 11:06:40.012280
```
```python
grouper = pd.Grouper(key='Time', freq='1d')
df.groupby(grouper)['Amount'].sum()
```
```
Time
2020-06-01 18.0
2020-06-02 8.8
Freq: D, Name: Amount, dtype: float64
```
贡献指南
评估
这个 Issue 还没有评估数据。