我是 python 文件数据处理的新手。我有以下文本文件,其中包含新大学校园的报告。我想从“colleges”列和“book_IDs_1”中提取 block_ABC_top 的数据,即 23。我还想知道在 Colleges 列中是否再出现 block_ABC_top 并找到 book IDs_1 列的值。可以在文本文件中吗?或者我必须将其更改为csv?我如何编写此数据处理的代码?请帮助我!
Copyright 1986-2019, Inc. All Rights Reserved.
Design Information
-----------------------------------------------------------------------------------------------------------------
| Version : (lin64) Build 2729669 Thu Dec 5 04:48:12 MST 2019
| Date : Wed Aug 26 00:46:08 2020
| Host : running 64-bit Red Hat Enterprise Linux Server release 7.8
| Command : college report
| Design : college
| Device : laptop
| Design State : in construction
-----------------------------------------------------------------------------------------------------------------
Table of Contents
-----------------
1. Information by Hierarchy
1. Information by Hierarchy
---------------------------
+----------------------------------------------+--------------------------------------------+------------+------------+---------+------+-----+
| colleges | Module | Total mems | book IDs_1 | canteen | BUS | UPS |
+----------------------------------------------+--------------------------------------------+------------+------------+---------+------+-----+
| block_ABC_top | (top) | 44 | 23 | 8 | 8 | 8 |
| (block_ABC_top_0) | block_ABC_top_0 | 5 | 5 | 5 | 2 | 9 |
+----------------------------------------------+--------------------------------------------+------------+------------+---------+------+-----+
我有一个数据列表,其中包含大学的数据,例如 block_ABC_top、block_ABC_top_1、block_ABC_top、block_ABC_top_1...这是我下面的代码我面临的问题是..它只获取 data[0] 的数据..但我有data[0] 和 data[2] 具有同一所大学,我希望检查发生两次
肥皂起泡泡
陪伴而非守候
杨魅力
相关分类