Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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