- sed指定行插入: sed -i “i” 或者"a"
- 插入列paste 或者awk
http://bbs.chinaunix.net/thread-342540-1-1.html - shell定义函数func(){ 函数体 }
- shell算术运算: ((c=$a+$b))
http://c.biancheng.net/view/2480.html - sed打印匹配行号: sed -n -e ‘/match_string/=’
- awk打印多列: awk -F ‘:’ ‘{print $1"t"$(NF-1)}’ file
- shell读取行
while read line
do
echo $line
done < test.txt
- 读取行:head, tail, cat, sed
- vim切换文件: bn,bp
- pandas插入列: df.insert(loc=len(df.columns), column=‘Player’, value=player_vals)或者d[‘player’] = value_list
- pandas插入行: loc或者append方法
- 创建空的dataframe: df_empty = pd.DataFrame(columns=[‘A’, ‘B’])