Handbook for Data Science and Artificial Intelligence
內容目录
Handbook for Data Science and Artificial Intelligence
內容目录

Python基础

  • class 的实例方法、类方法和静态方法

数据与数据类型

基本数据结构

基本控制流

常用语法糖

常用工具包

pandas

  • 遍历 DataFrame
for row in df.rows:
   ...

数据读入

FAQ

  • 明明格式没有问题,但是json读取的时候却出错
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

可能的原因是数据传输过程中出错,可以重新下载一下数据

pip

安装本地包

pip install -e .

安装 extra_requires

pip install -e .[test,dev,...]
pip install Somapackage[test,dev,...]

包的发布

setup.py

命令行

setup()中添加:

entry_points={
    "console_scripts": [
        "$command_name = $path2script:$function_name",
    ],
},

参考资料

官方文档