- 切换工作目录 ```python import os os.chdir(path) ## 切换到该目录下 os.getcwd() ## 查看当前路径 exec(open(‘file.py’).read()) ## source python脚本
- 迭代数据框
```python
import pandas as pd
otu = pd.read_csv("otu.txt",sep="\t")
for index,row in otu.iterrows(): ## 迭代数据框的每一行
- 追加元素 ```python mylist = [10,20,30] mylist.append( [7,8,9] ) ## 在列表中追加一个元素[7,8,9] mylist.extend([7,8,9]) ## 将后续列表添加到原列表当中,仅限列表作为参数
```