2016-04-01から1日間の記事一覧

<Python, pandas, SQlite> pandasでsqlite3する。

pandasでsqlite3を使う。 1.. DB作成。 In [1]: import sqlite3 In [2]: con = sqlite3.connect(':memory:') In [4]: con.execute(''' ...: create table {table} ( ...: {id} integer primary key autoincrement, ...: {name} text not null, ...: {brightn…

<Python, SQlite> sqlite3 を使う。

データベースdatabaseのsqlite3を使う。 1.. まずは、モジュール呼び出し。 :memory:とすると、メモリ上にデータベースを作成。 In [1]: import sqlite3 In [2]: con = sqlite3.connect(':memory:') 2.. 初期化。 テーブルtableを作る。 データベースの各要…