Search
 
SCRIPT & CODE EXAMPLE
 

SQL

convert sqlite table to pandas dataframe

import sqlite3
import pandas as pd

dat = sqlite3.connect('data.db')
query = dat.execute("SELECT * From <TABLENAME>")
cols = [column[0] for column in query.description]
results= pd.DataFrame.from_records(data = query.fetchall(), columns = cols)
Comment

PREVIOUS NEXT
Code Example
Sql :: postgresql drop primary key constraint 
Sql :: mysql concat two columns laravel eloquent 
Sql :: sql padd let with zeros 
Sql :: mysql text type max length 
Sql :: get date from now() mysql 
Sql :: convert epoch to date in sql server 
Sql :: file /etc/init.d/mysql not exists 
Sql :: group_concat max length mysql 
Sql :: mysql import sql file 
Sql :: show all tables in oracle 
Sql :: xampp mysql database not starting 
Sql :: mysql remove last empty newline 
Sql :: SQL Integer devision 
Sql :: reset auto increment in sql 
Sql :: how to check database username and password in postgresql 
Sql :: funzioni plsql 
Sql :: sqlite create integer column with limit 
Sql :: liquibase update row 
Sql :: insert all or first in oracle sql 
Sql :: oracle list datafiles in tablespace 
Sql :: postgresql create table with timestamp 
Sql :: mysql add comment to column 
Sql :: Are NULL values in a database the same as that of blank space or zero? 
Sql :: postgresql transaction discard all 
Sql :: how do you use sql in you company 
Sql :: select sql in descending order 
Sql :: v$session not found in oracle 
Sql :: reset auto increment in mysql 
Sql :: datetime add 2 hours sql 
Sql :: how to fetch alternate records from two tables 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =