NVIDIA / NVIDIA/cudf

[BUG] read_csv always reads values in quotes as strings

Open
#12,588 1 comment 0 reactions 0 assignees View on GitHub
0 - Backlog bug cuIO libcudf Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

A CSV file containing quoted values:

```python
In [15]: !cat test.csv
"1","2"
"3","4"
```

has the data type of the quoted values inferred by Pandas:

```python
In [20]: df = pd.read_csv("test.csv", index_col=False, header=None)

In [21]: df
Out[21]:
0 1
0 1 2
1 3 4

In [22]: df.dtypes
Out[22]:
0 int64
1 int64
dtype: object
```

but cuDF reads them as strings ("object" data type):

```python
In [23]: df = cudf.read_csv("test.csv", index_col=False, header=None)

In [24]: df
Out[24]:
0 1
0 1 2
1 3 4

In [25]: df.dtypes
Out[25]:
0 object
1 object
dtype: object
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.