Skip to content

Instantly share code, notes, and snippets.

@ksindi
Created July 4, 2016 16:01
Show Gist options
  • Save ksindi/f049a1796727c0d91d7214aa47e309cc to your computer and use it in GitHub Desktop.
Save ksindi/f049a1796727c0d91d7214aa47e309cc to your computer and use it in GitHub Desktop.
import pandas as pd
from io import StringIO
datastring = StringIO("""\
ticker avg_spread max_spread timestamp
a 0.22 1.84 2016-06-03 03:00:00
aa 0.01 0.10 2016-06-03 02:00:00
aaap 2.07 2.17 2016-06-03 01:00:00
aal 0.15 0.5 2016-06-03 04:00:00
""")
df = pd.read_table(datastring, sep='\s\s+', engine='python')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment