Skip to content

to_dataframe with GROUP BY not preserving column order of resulting data frame #35

@exwhyz

Description

@exwhyz

PyDrill:
0.3.4

Query:
select agegroup, count(*) as total from dfs./Users/hammer/data.csv.gz GROUP BY age group

Output:
Converting the results of the above query to a pandas data frame using to_dataframe() produces the columns in the reverse order (total, agegroup). Switching the order in the query has no effect either as it still creates a dataframe with columns in reverse order (total, agegroup). Select queries without GROUP BY clause produces the correct order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions