Skip to content

Instantly share code, notes, and snippets.

@nipunbatra
Created February 26, 2014 11:00
Show Gist options
  • Save nipunbatra/9227568 to your computer and use it in GitHub Desktop.
Save nipunbatra/9227568 to your computer and use it in GitHub Desktop.
In [60]: sql = "select timestamp, value from data where probe='edu.mit.media.funf.probe.builtin.WifiProbe'"
In [61]: df = psql.frame_query(sql, con)
In [62]: df.index = pd.to_datetime(df.timestamp, unit='s')
In [63]: df = df.drop("timestamp", 1)
In [65]: ser = df.value.apply(json.loads)
In [67]: ser.values[0]
Out[67]:
{u'BSSID': u'80:a1:d7:bb:e5:0c',
u'SSID': u'NoNetworkFound',
u'capabilities': u'[WEP][ESS]',
u'frequency': 2412,
u'level': -52,
u'timestamp': 1369476498.817}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment