随笔分类 -  Python编程

摘要:🧩 一、data[ ... ] 是什么数据访问方式? 这是 Pandas 的 布尔索引(Boolean Indexing),也叫 条件筛选(Conditional Selection)。 ✅ 作用: 从 DataFrame data 中,筛选出满足括号内条件的行,返回一个新的 DataFrame。 阅读全文
posted @ 2025-09-07 13:28 七星望 阅读(110) 评论(0) 推荐(0)
摘要:代码分析: str = 'abcdefg' print(str[1:])print(str[:-1])print(str[-1:])print(str[::-1])print(str[::-2])print(str[:]) 结果bcdefgabcdefggfedcbagecaabcdefg 1234 阅读全文
posted @ 2023-11-03 16:01 七星望 阅读(1044) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/handsome1013/p/10058838.htmlET.Parser 用法https://www.cnblogs.com/yezuhui/p/6853323.html https://blog.csdn.net/gz153016/article/ 阅读全文
posted @ 2020-07-15 20:05 七星望 阅读(346) 评论(0) 推荐(0)
摘要:Matplotlib有两个模块: 1) 绘图API:pyplot, 可这样导入import matplotlib.pyplot as plt 2)集成库:pylab, 是matplotlib Scipy Numpy的集成库 import pandas as pd import matplotlib. 阅读全文
posted @ 2020-03-01 10:51 七星望 阅读(374) 评论(0) 推荐(0)