摘要: git loggit reset --hard 686e844f044d39fb...git push --force 阅读全文
posted @ 2024-03-14 11:30 OTAKU_nicole 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import pytest class TestCase: def setup_class(self): print("setup_class:所有用例执行之前") def setup_method(self): print("setup_method: 每个用例开始前执行") def teardo 阅读全文
posted @ 2024-02-27 17:33 OTAKU_nicole 阅读(3) 评论(0) 推荐(0) 编辑
摘要: # 筛选某列包含A或B的数据 filtered_df = df[df['column_name'].str.contains('A|B')] # 筛选某列包含A和B的数据,且忽略大小写 filtered_df = df[df['column_name'].str.contains('A', case 阅读全文
posted @ 2023-12-28 14:36 OTAKU_nicole 阅读(17) 评论(0) 推荐(0) 编辑
摘要: import datetime import threading from time import sleep # 创建一个信号量,限制最多同时运行2个线程 semaphore = threading.Semaphore(2) # 创建一个线程锁 threadLock = threading.Loc 阅读全文
posted @ 2023-10-10 10:14 OTAKU_nicole 阅读(1) 评论(0) 推荐(0) 编辑
摘要: pytest-html指定版本3.1.1即可解决 pip install pytest-html==3.1.1 阅读全文
posted @ 2023-08-22 11:11 OTAKU_nicole 阅读(58) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd # 创建示例 DataFrame data = { 'Name': ['Alice', 'Bob', 'Charlie'], 'Age': [25, 30, 35], 'Salary': [50000, 60000, 45000] } df = pd.Data 阅读全文
posted @ 2023-08-08 15:35 OTAKU_nicole 阅读(170) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd # 创建示例 DataFrame data = { 'Name': ['Alice', 'Bob', 'Charlie'], 'Age': [25.0, 30.0, 35.0] # 注意:这里的年龄列是浮点数类型 } df = pd.DataFrame(dat 阅读全文
posted @ 2023-08-08 15:11 OTAKU_nicole 阅读(182) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd # 创建示例 DataFrame data = { 'Name': ['Alice', 'Bob', 'Charlie'], 'Age': [25, 30, 35], 'Occupation': ['Engineer', 'Teacher', 'Doctor' 阅读全文
posted @ 2023-08-08 15:04 OTAKU_nicole 阅读(139) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd # 按列分组 data = {'A': ["aa", "bb", "cc", "bb"], 'B': [5, 6, 10, 7], 'C': [0, 10, 3, 12]} df = pd.DataFrame(data) print(df) print(df. 阅读全文
posted @ 2023-08-08 14:57 OTAKU_nicole 阅读(32) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd # 创建示例 DataFrame data = { 'OldName1': [1, 2, 3], 'OldName2': [4, 5, 6] } df = pd.DataFrame(data) # 重命名列名 new_column_names = { 'Old 阅读全文
posted @ 2023-08-08 14:55 OTAKU_nicole 阅读(56) 评论(0) 推荐(0) 编辑