alteryx / alteryx/woodwork

Drop Woodwork index column from DataFrame

未关闭
#661 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
new feature
主要语言
Python
星标
155
派生
24
PR 合并指标
30 天内没有已合并 PR

描述

- As a user, I wish Woodwork would drop the column that's set as the Woodwork index and set the underlying pandas index as that column.

```python
df.ww.init()
assert 'id' in df

df.ww.set_index('id', drop_column=True)
assert 'id' not in df
assert all(df.index == [1,2,3,4]) # index matches the original column
assert df.index.name == 'id'
assert df.ww.index == 'id'
assert df.ww.logical_types['id'] == Integer # Schema is unchanged
```

tbd:
- `df.ww['id']` - should return an index or a series?
- Do we add column back in if index is reset to None?
- How do we handle selecting the index column - `df.ww.select('Integer')`

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。