Skip to content

read_csv treats zeroes as nan if column contains any nan #2599

Closed
@sanand0

Description

@sanand0

If data.csv contains the following (column B has a zero in the first row, and is empty in the second)

A,B
0,0
0,

... pandas 0.10.0 incorrectly reads it as:

In [7]: pd.read_csv('data.csv')
Out[9]:
   A   B
0  0 NaN
1  0 NaN

... whereas pandas 0.9.0 reads it right:

In [5]: pd.read_csv('data.csv')
Out[6]:
   A   B
0  0   0
1  0 NaN

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIO DataIO issues that don't fit into a more specific label

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions