Skip to content

when a column contains alpha numeric ending with 'e', pandas converts these to float64 #8272

Closed
@Siva1018

Description

@Siva1018

I'm reading some excel spreadsheets (xlsx format) into pandas using read_excel, which generally works great. The problem I have is that when a column contains alpha numeric ending with 'e', pandas converts these to float64 type without 'e' in its value, and I would like them to be treated as strings. After reading them in, I can convert the column to str:
screenshot from 2014-09-15 15 26 42

dataset = read_excel(excel_file,sheet_name,na_values=[" "])
while reading this excel file to dataset it shows loan id as a number without 'e'

screenshot from 2014-09-15 15 32 01

Metadata

Metadata

Assignees

No one assigned

    Labels

    Dtype ConversionsUnexpected or buggy dtype conversionsIO Excelread_excel, to_excel

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions