記事一覧
.locを使えというアラート
またアラートだよ( ´∀` ) #元コードsurvey ['comment'] = survey['comment'].str.replace('AA', '') またまたお世話になります(*- -)(*_ _)ペコリ しかし、うんともす…
機械学習 ベースライン検証
#ベースライン検証データ作成x_tr , x_va2, y_tr, y_va2 = train_test_split(x_train, y_train, test_size=0.2, shuffle=True, stratify=y_train, random_state=123)x_tr1, …
pandas🐼で文字コードを調べるぞ!
import chardetfiles = ['12-7-1.csv', '12-7-2.csv','12-7-3.csv']df = pd.DataFrame()for file in files: with open(file, 'rb') as f: contents = f.read() enc = chardet.detect(contents)['encoding']
もっとみる.locを使えというアラート
またアラートだよ( ´∀` )
#元コードsurvey ['comment'] = survey['comment'].str.replace('AA', '')
またまたお世話になります(*- -)(*_ _)ペコリ
しかし、うんともすんともー
comment = survey['comment'].str.replace('AA', '')survey = survey.merge(com
機械学習 ベースライン検証
#ベースライン検証データ作成x_tr , x_va2, y_tr, y_va2 = train_test_split(x_train, y_train, test_size=0.2, shuffle=True, stratify=y_train, random_state=123)x_tr1, x_va1, y_tr1, y_va1 = train_test_split(x_tr, y_tr, te
もっとみるLGBでクロスバリデーション
params = {'boosting_type':'gbdt', 'objective':'binary', 'metric':'auc', 'learning_rate':0.1, 'num_leaves':16, 'n_estimators':100000, 'random_state
もっとみるシリーズを横にして、データフレームとつなぐ
困った。
正月早々、なんかアラート出た。
え! DataFrameにappendできなくなるだって!!!!
パンダスのコンキャットにせえいうてはる
元コード
tmp_sec = pd.Series([num/fps, len(human)], index=list_df.columns)list_df.append(tmp_sec, ignore_index=True)
ちょっと前に発行され