[BUG] `DataFrame.merge` does not assign `dtype` as expected in result as pandas does
Open
bug
Python
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
The `dtype` in the result of a merge is inconsistent with the equivalent pandas merge for the same inputs:
cuDF:
```
>>> df1=cudf.DataFrame({"a":[1,2,3,4]})
>>> df2=cudf.DataFrame(columns=["a"])
>>> r=df2.merge(df1,how="outer")
>>> df1["a"].dtype
dtype('int64')
>>> r["a"].dtype
dtype('float64')
```
pandas:
```
>>> pdf1=pd.DataFrame({"a":[1,2,3,4]})
>>> pdf2=pd.DataFrame(columns=["a"])
>>> pr=pdf2.merge(pdf1,how="outer")
>>> pdf1["a"].dtype
dtype('int64')
>>> pr["a"].dtype
dtype('int64')
```
Contributor guide
Assessment
This issue has not been assessed yet.