星空博客

2021年1月14日

pandas取dataframe特定行/列

摘要: https://www.cnblogs.com/nxf-rabbit75/p/10105271.html 1.按列取、按索引/行取、按特定行列取 import numpy as np from pandas import DataFrame import pandas as pd df=DataFr 阅读全文

posted @ 2021-01-14 17:06 星空博客 阅读(6811) 评论(0) 推荐(1) 编辑

schedule作业调度器 do(job)

摘要: https://zhuanlan.zhihu.com/p/23086148schedule简介 既然schedule说是给人类使用的作业调度器, 先来看看作者给提供的例子: import schedule import time def job(): print("I'm working...") 阅读全文

posted @ 2021-01-14 11:13 星空博客 阅读(435) 评论(0) 推荐(0) 编辑

2020年12月30日

python timedelta()

摘要: datetime.timedelta(days=0,seconds=0,microseconds=0,milliseconds=0,minutes=0,hours=0,weeks=0) 阅读全文

posted @ 2020-12-30 16:39 星空博客 阅读(76) 评论(0) 推荐(0) 编辑

Python str.splitlines()方法

摘要: 用途:Python splitlines() 按照行('\r', '\r\n', \n')分隔,返回一个包含各行作为元素的列表,如果参数 keepends 为 False,不包含换行符,如果为 True,则保留换行符。 拆分一个包含多行的字符串,以每行为一个元素返回一个列表。如果字符串不是多行的,则 阅读全文

posted @ 2020-12-30 14:00 星空博客 阅读(285) 评论(0) 推荐(0) 编辑

python str.startswith()

摘要: 用途:与str.endwith()相反,判断字符串是否以指定前缀开始。 语法:str.startwith(prefix[, start[, end]]): 示例1: s = 'Apollo' s.startswith('Ap') print(s.startswith('Ap')) 打印结果:True 阅读全文

posted @ 2020-12-30 13:55 星空博客 阅读(215) 评论(0) 推荐(0) 编辑

2020年12月12日

python | pandas | 移动窗口函数rolling

摘要: https://blog.csdn.net/xxzhangx/article/details/76938053 阅读全文

posted @ 2020-12-12 17:35 星空博客 阅读(213) 评论(0) 推荐(0) 编辑

2020年12月11日

pandas 筛选读取引用特定的行列值

摘要: https://www.cnblogs.com/nxf-rabbit75/p/10105271.html 阅读全文

posted @ 2020-12-11 10:24 星空博客 阅读(331) 评论(0) 推荐(0) 编辑

2020年9月2日

Matlab分隔字符串之strsplit和strtok用法

摘要: 1、strsplit 分隔字符串 tline = strsplit(tline) ; %默认是以空白字符为分隔符,将tline分隔为以字符串组成的元胞数组 %tline = strsplit(tline, {':', ',', '/'}); %多个不同分隔符分隔 time = [tline{1} t 阅读全文

posted @ 2020-09-02 15:39 星空博客 阅读(2702) 评论(0) 推荐(0) 编辑

2020年9月1日

Matlab文本读取之textread用法

摘要: textread 未完待续。。。。 1、读取每列具有相同数据类型的标准格式文件文件,格式化文本。 [A, B, C, D] = textread(filename, '%s %s %f %d', 'headerlines', 2) 怎么调用: 2、读取规律混合格式列的文本 data= textrea 阅读全文

posted @ 2020-09-01 23:53 星空博客 阅读(7951) 评论(0) 推荐(0) 编辑

导航