Skip to content

PERF: large subset of block cast #13457

@chris-b1

Description

@chris-b1

from SO

I'm guessing there's a lot of inference / checks along this path, but this is slower than I'd expect.

In [66]: df = pd.DataFrame(np.random.randint(0,1000, size=(10000, 1026)))
    ...: f = list(range(1024))
    ...: 

In [67]: %time df[f] = df[f].astype(float)
Wall time: 10.4 s

Metadata

Metadata

Assignees

No one assigned

    Labels

    IndexingRelated to indexing on series/frames, not to indexes themselvesInternalsRelated to non-user accessible pandas implementationPerformanceMemory or execution speed performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions