Skip to content

Instantly share code, notes, and snippets.

@nipunbatra
Created February 26, 2014 11:03
Show Gist options
  • Save nipunbatra/9227599 to your computer and use it in GitHub Desktop.
Save nipunbatra/9227599 to your computer and use it in GitHub Desktop.
In [74]: sql = "select timestamp, value from data where probe='edu.mit.media.funf.probe.builtin.AudioFeaturesProbe'"
In [75]: df = psql.frame_query(sql, con)
In [76]: df.index = pd.to_datetime(df.timestamp, unit='s')
In [77]: df = df.drop("timestamp", 1)
In [79]: ser = df.value.apply(json.loads)
In [82]: ser.values[0]
Out[82]:
{u'diffSecs': 1.0540001392364502,
u'l1Norm': 68.381625,
u'l2Norm': 110.89188822903144,
u'linfNorm': 27.85677655436824,
u'mfccs': [97.7547870971158,
5.576576691591249,
-4.144810199915604,
-1.1740967613926112,
-1.3520381096743597,
-1.1164199510265365,
-1.3558814649482684,
-1.956724233273211,
0.46096356595334187,
0.847728908867593,
-1.146778179115537,
1.886700935113676],
u'psdAcrossFrequencyBands': [75806084.42318386,
179548691.83229715,
81566578.61859998,
19940598.209110025],
u'timestamp': 1369476500.342}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment