format问题
# 想要输出大括号
f = '{{{}}}'.format('123')
assert f == '{123}'
pytest问题
py.test test_conf2bin.py --cov-report=html --cov-config=.coveragerc --cov=.
gunicorn 或 pytest 找不到问题
重新安装pip3 install pytest, 就能看到warning “/usr/local/python3/bin” not in PATH
解决方案, 在vi /etc/profile加上export PATH=$PATH:/usr/local/python3/bin 后
source /etc/profile就好了
python json.dumps 中的ensure_ascii 参数引起的中文编码问题
https://www.cnblogs.com/biangbiang/archive/2013/02/19/2916780.html
mongo 对缺少的字段, 以及none的字段进行区分
df = pd.DataFrame([{'a': -1}, {'b': -1, 'c': None}], dtype=object)
>>>df
a b c
0 -1 NaN NaN
1 NaN -1 None
按照值进行区分