Skip to content

df.convert_objects removed from pandas #52

@philipstarkey

Description

@philipstarkey

Original report (archived issue) by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


pandas 0.25 has dropped DataFrame.convert_obects(), resulting in an exception from the server when getting the dataframe using lyse.data().

AttributeError: 'DataFrame' object has no attribute 'convert objects'

Discussion about the deprecation and removal here:

pandas-dev/pandas#11221

As a reminder, we're using this function to convert columns of the dataframe from Python objects into numpy/pandas dtypes where possible, which makes the dataframe faster to pickle and send over the wire.

We'll need to decide on what to do. It is possible that the performance reason for doing convert_objects() may no longer be as important as performance in other relevant components may have improved, though it is still a semantic change to be returning dataframes where the numpy arrays pulled out of them are of dtype object containing Python floats instead of being dtype float as expected.

It seems like the alternatives to convert_objects may require explicitly saying the type of each column, which would be super annoying. But I'll look into it and see if we can replicate the current behaviour using the alternatives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcritical

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions