Skip to content

read_csv dtype argument not working when there is a footer #5232

Closed
@socheon

Description

@socheon

xref #7141

Datafile test.csv

col1|col2
a|438087272980
b|399432587827
c|592706116147
d|1584843561523
footer 1

Command

print pd.read_csv('test.csv', sep='|', skipfooter=1, dtype={'col2':'object'}).dtypes

Output

col1 object
col2 int64
dtype: object

Expected Output

col1 object
col2 object
dtype: object

Platform

Windows XP, Python 2.7, Pandas version 0.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDtype ConversionsUnexpected or buggy dtype conversionsIO CSVread_csv, to_csv

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions