Skip to content

Instantly share code, notes, and snippets.

View dryqin's full-sized avatar

dryqin

View GitHub Profile
@woemler
woemler / pandas_hdf5_test.py
Created January 7, 2014 21:15
Pandas HDF5 cheat sheet
import pandas as pd
# Read a TSV file into a data frame
# This will automatically handle the data types
df = pd.read_csv("my_data.txt", sep="\t")
# Write the data frame to a storer HDF5 file in the table "data", overwriting existing files
df.to_hdf("my_data.store.h5", 'data', mode="w")
# Writing to ta table formatted HDF5 file is a little trickier