Skip to content

Instantly share code, notes, and snippets.

@fonnesbeck
Created May 2, 2016 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fonnesbeck/629f0e46420633b365c57783d17dda79 to your computer and use it in GitHub Desktop.
Save fonnesbeck/629f0e46420633b365c57783d17dda79 to your computer and use it in GitHub Desktop.
Writing a formated binary file from a Pandas Dataframe
df_records = pd.DataFrame(records)
# do some stuff
new_recarray = df_records.to_records()
new_recarray.tofile("myfile.npy")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment