pydrill
pydrill copied to clipboard
to_dataframe with GROUP BY not preserving column order of resulting data frame
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.
See #43