天宫鹤

2024年7月17日

Python读Excel数据,创建Word文档上下文字典列表,元素为字典(新)

摘要: # 读Excel数据,创建Word文档上下文字典列表,元素为每个培训人员的上下文字典 def create_docx_context_dict_list(_excel_path): """ 输入参数: :param _excel_path:Excel全路径 功能:创建Word文档上下文字典列表,元素 阅读全文

posted @ 2024-07-17 22:05 GoGrid 阅读(1) 评论(0) 推荐(0) 编辑

Python使用指定数据、索引、列名创建DataFrame

摘要: data = [[109, 119, 98], [106, 99, 85], [108, 110, 104], [102, 99]] # 数据 name = ['King', 'Order', 'God', 'Dd'] # 索引 columns = ['语文', '数学', "英语"] # 列名 d 阅读全文

posted @ 2024-07-17 17:17 GoGrid 阅读(3) 评论(0) 推荐(0) 编辑

Python解决FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.

摘要: from io import StringIO try: resp = requests.get(url) # pd.set_option('future.no_silent_downcasting', True) # 不提示函数在未来版本中将被替代的警告 df = pd.read_html(Str 阅读全文

posted @ 2024-07-17 16:54 GoGrid 阅读(24) 评论(0) 推荐(0) 编辑

导航