1. Learn
  2. /
  3. 课程
  4. /
  5. Python 金融入门

Connected

道练习

筛选数组

在本节中,您将聚焦于两个行业:

  • Information Technology
  • Consumer Staples

numpy 已按 np 导入,且 S&P 100 数据以数组形式存储在 names、sectors 和 pe(市盈率,price to earnings ratio)中。

说明 1 / 共 2 个

undefined XP
    1
    2
  • 创建一个布尔数组,判断 sectors 中哪些元素为 'Information Technology'。
  • 使用该布尔数组从 Information Technology 行业中筛选 names 和 pe。