- 博客(3)
- 收藏
- 关注
原创 python里str内置函数
str内置函数 字符串查找类:find、index、islower find和index均是查找字符串中是否包含一个子串,二者的区别是index找不到字符串会报错,而find会返回-1
2020-12-24 15:53:28
464
原创 python行列操作集锦
现有一个excel工作簿,里面有两张表student1和student2,表结构一样,各有三列:学生ID,学生名和分数,分别对其进行行列操作,以便于更深刻掌握python关于行列操作的语法。 行操作 import pandas as pd student1=pd.read_excel(r"C:\Users\Desktop\example.xlsx",sheet_name="student1") student2=pd.read_excel(r"C:\Users\Desktop\example.xlsx
2020-09-29 14:52:46
2413
原创 使用python中matplotlib作图
柱形图 导入库 import pandas as pd import matplotlib.pyplot as plt 读取数据 示例数据包含两列(学校名和学生数),如下图所示: data=pd.read_excel(r"C:\Users\Desktop\柱形图.xlsx") #按照学生数进行降序排列 data.sort_value(by="users",ascending=False,inplace=True) 作图 plt.bar(data.shcool,data.users,colo
2020-09-20 14:25:59
459
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅