alteryx / alteryx/featuretools

Equal primitive evaluates incompatible input types

未關閉
#1,851 10 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
7.7k
分支
915
PR 合併指標
30 天內沒有已合併 PR

描述

While calculating the feature matrix, the `Equal` primitive raises an error as a result of evaluating incompatible input types. I think the configured input types currently allow for any combination -- `[ColumnSchema(), ColumnSchema()]`.

### Example

```python
import featuretools as ft
import pandas as pd

data = [
{"f_0": "2015-07-01", "f_2": "08335394550"},
{"f_0": "2015-07-02", "f_2": "+49 (0) 0345 300033"},
{"f_0": "2015-07-03", "f_2": "+49(0)2598 04457"},
{"f_0": "2015-07-04", "f_2": "0741470003"},
{"f_0": "2015-07-05", "f_2": "04181 83668"},
]

dtypes = dict(f_0='datetime64[ns]', f_2='string')
df = pd.DataFrame(data=data).astype(dtypes)
```

```
f_0 f_2
2015-07-01 08335394550
2015-07-02 +49 (0) 0345 300033
2015-07-03 +49(0)2598 04457
2015-07-04 0741470003
2015-07-05 04181 83668
```

```python
es = ft.EntitySet()
es = es.add_dataframe(df, dataframe_name='a', index='id', make_index=True,)
ft.dfs(entityset=es, target_dataframe_name='a', trans_primitives=['equal'], agg_primitives=[])
```

```
featuretools/primitives/standard/binary_transform.py in equal(x_vals, y_vals)
281 x_vals = x_vals.cat.add_categories(categories.difference(set(x_vals.cat.categories)))
282 y_vals = y_vals.cat.add_categories(categories.difference(set(y_vals.cat.categories)))
--> 283 return x_vals.eq(y_vals)

OverflowError: signed integer is greater than maximum
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。