alteryx / alteryx/woodwork

Manipulating pandas dataframe doubles length of pandas column in Woodwork 0.16.0 (with string[arrow] dtype)

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

描述

In the latest Woodwork release manipulating the top level pandas dataframe after initializing woodwork duplicates the column and the column doubles in length. See [here](https://github.com/alteryx/evalml/runs/6124456856) and specifically `test_simple_imputer_ignores_natural_language` to see the EvalML failure.

```python
import woodwork
import pandas as pd
import numpy as np

cols = {
"dates": pd.date_range("01-01-2022", periods=20),
"categorical col": pd.Series(
["zero", "one", "two", "zero", "two"] * 4, dtype="category"
),
"int col": [0, 1, 2, 0, 3] * 4,
"object col": ["b", "b", "a", "c", "d"] * 4,
"float col": [0.0, 1.0, 0.0, -2.0, 5.0] * 4,
"bool col": [True, False, False, True, True] * 4,
"categorical with nan": pd.Series(
[np.nan, "1", "0", "0", "3"] * 4, dtype="category"
),
"int with nan": [np.nan, 1, 0, 0, 1] * 4,
"float with nan": [0.0, 1.0, np.nan, -1.0, 0.0] * 4,
"object with nan": ["b", "b", np.nan, "c", np.nan] * 4,
"bool col with nan": pd.Series(
[True, np.nan, False, np.nan, True] * 4, dtype="category"
),
"all nan": [np.nan, np.nan, np.nan, np.nan, np.nan] * 4,
"all nan cat": pd.Series(
[np.nan, np.nan, np.nan, np.nan, np.nan] * 4, dtype="category"
),
"natural language col": pd.Series(
["cats are really great", "don't", "believe", "me?", "well..."] * 4,
dtype="string",
),
}

df = pd.DataFrame(cols)
df_1 = pd.DataFrame(cols)

df_1.ww.init()

df.iloc[-1, :] = None
df_1.iloc[-1, :] = None

# this assertion fails with string[arrow] dtype in Woodwork
assert df['natural language col'] != df_1['natural language col']
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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