pydrill icon indicating copy to clipboard operation
pydrill copied to clipboard

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

Open exwhyz opened this issue 7 years ago • 1 comments

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.

exwhyz avatar Oct 10 '18 14:10 exwhyz

See #43

jnturton avatar Jun 07 '20 08:06 jnturton