
Python
文章平均质量分 53
Python
弈-剑
本科就读于中山大学智能工程学院,专业是交通工程,兴趣是网络安全,会分享一些自己的研究成果,欢迎大家关注我的博客。
展开
-
Python时间运用(横坐标输出时间)
import pandas as pdtime = pd.datetime(2019,7,7,6,0)display(time)datetime.datetime(2019, 7, 7, 6, 0)import pandas as pdtime = pd.datetime(2019,7,7,6,0)time = time + pd.Timedelta(minutes=10)display(time)datetime.datetime(2019, 7, 7, 6, 10)# 输出原创 2021-04-23 17:19:41 · 3111 阅读 · 0 评论 -
NumPy数组的简单计算
import numpy as np #导入NumPy库 arr1 = np.array([1, 2, 3, 4]) #创建一维数组 print('创建的数组为:',arr1) 创建的数组为: [1 2 3 4]arr2 = np.array([[1, 2, 3],[4, 5, 6], [7, 8, 9]])print('创建的数组为:\n',arr2) 创建的数组为:[[1 2 3][4 5 6][7 8 9]]案例x=[123]\boldsymbol{x}=\begi原创 2021-04-15 17:48:35 · 271 阅读 · 0 评论 -
pandas时间序列——date_range()函数
这里写目录标题参数说明示例freq参数详解参考资料参数说明pandas.date_range()参数名称说明start开始时间,接收string、datetimeend结束时间,接收string、datetimeperiods间隔数或要生成的时间数目freq时间间隔,一般使用频率字符串,如D表示1天,H表示1小时该函数返回DatetimeIndex示例import pandas as pd#默认频率为D,即天time = pd.date_原创 2021-04-12 16:46:33 · 1981 阅读 · 0 评论