Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Output column ordering deterministic? #252

Answered by skrawcz
gravesee asked this question in Q&A
Discussion options

You must be logged in to vote

🤔 It definitely should be:

  1. We create a dictionary and insert into it based on the order of final_vars. https://github.com/stitchfix/hamilton/blob/main/hamilton/driver.py#L175-L177
  2. If you're using the default driver (and thus result builder), then a pandas dataframe will be created here https://github.com/stitchfix/hamilton/blob/main/hamilton/base.py#L174
  3. Which delegates to pandas, and according to their docs If data is a dict, column order follows insertion-order. should follow the insertion order (source).

Otherwise to plant the thought, we'd love contributions to our examples folder, or a blog on how you're using Hamilton with pyspark.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by skrawcz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants