技術 SQL [SQL]テーブルに項目追加&インデックス付与する PR 2015-07-12 2021-10-11 既に存在するテーブルに項目追加して、その項目にインデックスを付与する手順 1)テーブル更新 alter table test_tbl add {項目名} datetime not null FIRST; 2)インデックス付与 alter table test_tbl add index index1( {項目名}); 逆に既存のテーブルから不要な項目を削除する場合は以下で対応可能 3)テーブルの項目削除 alter table test_tbl drop {項目名};
技術 [python]pandasでobject型をfloat型に変換する方法 import pandas as pd # DataFrameの作成 df = pd.DataFrame({'col1': }) # '判断...
技術 【トレジャーデータ】PRESTOで累積和を算出する 日別、商品別での価格とその累積和を取得するSQL SELECT target_date , shohin_id , price , SUM(...
技術 [python]matplotlibのマジックコマンドメモ ## コードセル直下にグラフを描画する %matplotlib inline ## 別ウインドウにインタラクティブなグラフを表示する %ma...
技術 [bigquery]timestamp項目の年月日変換(FORMAT_TIMESTAMPを利用) -- 事前にDECLAREで変数定義 DECLARE timestamp_date TIMESTAMP; -- 変数に値を設定 SET ti...