hive 基本處理 權重取樣和

2021-10-19 08:06:26 字數 497 閱讀 8944

1.權重取樣:

權重weight越大,取樣的頻率越高

pow(rand(), 1/(weight+0.01))

2.hive 增加欄位和刪除字段

增加字段示例:

一次增加乙個列(預設新增為最後一列)

alter table table add columns (new_col int);

刪除示例:

原有hive表table_test中有a,b,c,d,e這幾個字段

將從table_test中刪除「d」列:

alter table table_testreplace columns (a int, b int,c string,e string);

將d和e兩列一起刪除:

alter table table_testreplace columns (a int, b int,c string);

資料基本處理

import 基本模組import numpy as np np.set printoptions suppress true import pandas as pd pd.set option display.max columns none pd.set option display.max r...

token的基本處理和儲存

令牌的儲存 基本的token引數 使用jwt替換預設的token 擴充套件和解析jwt的資訊 認證伺服器繼承authorizationserverconfigureradapter 重寫 configure clientdetailsserviceconfigurer clients 配置token...

List集合基本處理

1.迴圈list中的所有元素然後刪除重複 for int i 0 i list.size 1 i 2.通過hashset踢除重複元素 hashset h new hashset list list.clear list.addall h 3.刪除arraylist中重複元素,保持順序 for ite...