import numpy as np from pandas import * import json import sqlite3 from pandas import DataFrame, Series import pandas as pd path="D:/DATA/kampret.db" con = sqlite3.connect(path) data = pandas.read_sql("select * from data",con) data.head() df = pandas.read_sql("select value from data where name='SmsProbe'",con) df.head() a = df['value'] ajson = a[0:10] type(ajson) records = [json.loads(line) for line in ajson] records timestamp = [asu['timestamp'] for asu in records if 'timestamp' in asu] type1 = [asu['type'] for asu in records if 'type' in asu] status = [asu['status'] for asu in records if 'status' in asu] dataku = [timestamp,type1,status] dfall = pd.DataFrame(dataku) dfall dfnew = dfall.T dfnew.rename(columns={0:'timestamp',1:'type',2:'status'})