使用python建立数组的方法

本文介绍两种在python里建立数组的方法。第一种是经过字典直接建立,第二种是经过转换列表获得数组。 方法1.字典建立 (1)导入功能 (2)创立字典 (3)将字典带上索引转换为数组python 代码示例以下: import numpy as np import pandas as pdweb data={“name”:[‘xiaozhang’,‘xiaoli’,‘lily’,‘tony’], “
相关文章
相关标签/搜索