摘要:
1. preprocessing.LabelEncoder() import pandas as pd from sklearn import preprocessing le = preprocessing.LabelEncoder() ddf = pd.DataFrame({"id":[1,2, 阅读全文
摘要:
ddf = pd.DataFrame({"id":[1,2,3], "name":[4,5,6],"age":[7,8,9]})ddf = ddf.drop(columns =["id","name"])ddf 阅读全文
摘要:
参考:https://blog.csdn.net/m0_38139979/article/details/106606633 result1= result.groupby(['user_id', 'industry'])['click_times'].sum().reset_index(name= 阅读全文
摘要:
flag = df.price.duplicated() # flag = df.duplicated() #参考:https://www.cnblogs.com/trotl/p/11876292.html flag.any() df.drop_duplicats 阅读全文
摘要:
tar -zcvf /home/xahot.tar.gz /xahottar -zcvf 打包后生成的文件名全路径 要打包的目录 sudo apt install zip unzip zip -r abcdef.zip abc def.txt 这句命令的意思是将文件夹abc和文件def.txt压缩成 阅读全文
摘要:
kaggle链接:https://www.kaggle.com/c/word2vec-nlp-tutorial/overview 简介:给出 50,000 IMDB movie reviews,进行0和1情感二分类 我的github代码仓库:https://github.com/beathahaha 阅读全文
摘要:
data是一个dataframe #data["x1"]=data[["a","b"]].apply(lambda x:x["a"]+x["b"],axis=1) data["x1"]=data.apply(lambda x:x["a"]+x["b"],axis=1) 一定要加axis=1,指定列, 阅读全文
摘要:
export BERT_BASE_DIR=/path/to/bert/uncased_L-12_H-768_A-12 export GLUE_DIR=/path/to/glue python run_classifier.py \ --task_name=MRPC \ --do_train=true 阅读全文
摘要:
参考: https://www.cnblogs.com/sidianok/p/13176754.html 关键指令:nohup nohup command > myout.file 2>&1 & 例子: 推荐: nohup python -u abc.py > nohup.log 2>&1 & (加 阅读全文
摘要:
1. 解压,对于tar格式和zip格式不同,后者是unzip test.zip ,如果要解压到指定路径是 unzip test.zip -d ../ 阅读全文