Skip to content

Instantly share code, notes, and snippets.

@c-l-nguyen
Last active May 11, 2020 17:24
Show Gist options
  • Save c-l-nguyen/4de1920e1d71add17fe76024dfb20838 to your computer and use it in GitHub Desktop.
Save c-l-nguyen/4de1920e1d71add17fe76024dfb20838 to your computer and use it in GitHub Desktop.
# append all DataFrames into one before writing to single table in Hyper
final_df = df1.append(df2).append(df3).reset_index(drop=True)
pantab.frames_to_hyper({"pokemon": final_df}, "hyper/all_pokemon_in_one.hyper")
# this produces the same result as above
pantab.frame_to_hyper(df1, "hyper/all_pokemon_append.hyper", table = "pokemon")
pantab.frame_to_hyper(df2, "hyper/all_pokemon_append.hyper", table = "pokemon", table_mode = "a")
pantab.frame_to_hyper(df3, "hyper/all_pokemon_append.hyper", table = "pokemon", table_mode = "a")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment