ltito
ltito

Reputation: 13

how to force header order in result of a select?

I developed 2 codes but the goal is the same. The first, it submit a query to apache drill by pydrill. The query in this case is a lot of select comands and a union all between them, then I save the result in a dataframe. The second code, it submit a lot of queries (each is a select) and I append the result in dataframe. Both the solution doesn't respect the columns order. For instance: select column[1] as A, column[2] as B The result is a big dataframe and its header is B, A In my case, the dataframe has 7 columns and the order is different then the clause select. One of the columns is a fqn attribut (from apache drill) to get the path of current file.

Upvotes: 0

Views: 51

Answers (0)

Related Questions