上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页
摘要: 文件IO 读写txt文件 with open("../files/test.txt", encoding="utf-8-sig") as f: str = f.read() lst = [] if str: data = str.split("\n") for row in data: if len 阅读全文
posted @ 2024-01-10 16:43 carol2014 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 有时间看下seaborn库,写一些demo记录下 import numpy as np import seaborn as sns import matplotlib.pyplot as plt fig = plt.figure(figsize=(20, 10)) # 解决中文不显示和负号不显示问题 阅读全文
posted @ 2024-01-03 17:12 carol2014 阅读(30) 评论(0) 推荐(0) 编辑
摘要: pd.csv a,b,c,d,e 0,9,2,14,2 1,5,5,9,15 2,7,2,7,6 3,7,3,7,16 4,5,3,11,15 5,8,3,9,16 6,6,4,14,6 7,8,3,9,9 8,5,4,12,5 9,8,6,7,4 10,6,4,8,1 11,7,7,14,13 1 阅读全文
posted @ 2024-01-03 16:14 carol2014 阅读(32) 评论(0) 推荐(0) 编辑
摘要: pandas中有两类非常重要的数据结构,即序列Series和数据框DataFrame。 Series类似于numpy中的一维数组;DataFrame类似于numpy中的二维数组。 DataFrame创建 # 通过二维数组创建数据框 df1 = pd.DataFrame(np.arange(12).r 阅读全文
posted @ 2024-01-03 15:55 carol2014 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 多维数组定义 import numpy as np # 多维数组定义 np.array((2, 3, 4)) # 类型为int32 的一维数组 np.array([2.0, 3.0, 4.0]) # 类型为flloat64 的一维数组 np.array(((2, 3, 4, 5), (4, 5, 6 阅读全文
posted @ 2024-01-03 14:49 carol2014 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 1 字符串函数 SELECT title,LENGTH(title),SUBSTRING(title,1,1),LEFT(title,1),RIGHT(title,1),UPPER(title),LOWER(title),REPLACE(title, 'g' ,'l'),CONCAT('title: 阅读全文
posted @ 2024-01-02 15:48 carol2014 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 最近要经常用到mysql的日期相关函数,但以前用的少,索性总结下 1 DATE_FORMAT(date,format)、TIME_FORMAT(time,format) published_at字段以datetime类型存储 format格式 %a 缩写星期名 %b 缩写月名 %c 月,数值 %D 阅读全文
posted @ 2023-12-29 17:17 carol2014 阅读(5) 评论(0) 推荐(0) 编辑
摘要: Electron是一个使用 JavaScript、HTML 和 CSS 构建桌面应用程序的框架。 嵌入 Chromium 和 Node.js 到 二进制的 Electron 允许您保持一个 JavaScript 代码代码库并创建 在Windows上运行的跨平台应用 macOS和Linux——不需要本 阅读全文
posted @ 2023-12-28 15:01 carol2014 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 日常开发过程中会使用原生js和jquery设置获取checked、disabled属性,测试总结下。 原生js <dl> <dt>表单</dt> <dd> <p>名字:<input type="text" id="name" value="name" /></p> <p> 城市:<select id 阅读全文
posted @ 2023-12-27 17:16 carol2014 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 状态管理 src/views/Pinia.vue <script setup> import { ref } from "vue"; import { storeToRefs } from "pinia"; import { useCounterStore } from "../stores/cou 阅读全文
posted @ 2023-12-26 16:44 carol2014 阅读(17) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页