Skip to content

Converting to DataFrames.jl, performance #54

@FrancisH-C

Description

@FrancisH-C

On a large dataset, converting from Pandas.DataFrame to DataFrames.DataFrame with constructor takes a lot of time. Not sure if it is Pandas.jl job to ensure that but I figure I should post it anyway. Working exemple in julia 1.0 :

# panda_df is a large Pandas.DataFrame
# This takes  ~ 1h
DataFrames.DataFrame(panda_df)

# This takes ~5 min (probably not the optimal solution)
names=Symbol.(Pandas.values.(Pandas.columns(panda_df)))
df=DataFrames.DataFrame()   
for i in 1:length(names)
    df[names[i]]=Array(panda_df[names[i]])
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions