alteryx / alteryx/woodwork

Drop Woodwork index column from DataFrame

Abierto
#661 0 comentarios 1 reacción 0 asignados Ver en GitHub
new feature
Lenguaje dominante
Python
Estrellas
155
Forks
24
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

- 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')`

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.