会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
tiansz
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
10
11
···
35
下一页
2022年10月11日
pandas批量读取xlsx中的sheet
摘要: import pandas as pd #sheet_name=None的意思是,一次性将所有的工作表都读取出来 dfs2 = pd.read_excel("test.xls",sheet_name=None) pd.concat(dfs2).to_excel("text.xlsx") 参考资料:h
阅读全文
posted @ 2022-10-11 10:44 tiansz
阅读(66)
评论(0)
推荐(0)
2022年9月23日
中文显示乱码、每行差值、等间距拆分列表等
摘要: # %% import pandas as pd import numpy as np import matplotlib.pyplot as plt #解决中文显示问题 plt.rcParams['font.sans-serif'] = ['KaiTi'] # 指定默认字体 plt.rcParam
阅读全文
posted @ 2022-09-23 17:38 tiansz
阅读(21)
评论(0)
推荐(0)
python数据透视表
摘要: # %% import pandas as pd import numpy as np # %% df = pd.read_csv('标普500财务数据项目.csv', sep=',') # %% df # %% atq = df.iloc[:, [0,1,2,4]] niq = df.iloc[:
阅读全文
posted @ 2022-09-23 13:45 tiansz
阅读(44)
评论(0)
推荐(0)
谷歌学术助手
摘要: https://codeload.github.com/Kenguba/google-access-helper/zip/refs/heads/master 在以上网址下载对应的浏览器插件,然后按照说明安装浏览器拓展。 最后注册账号即可使用
阅读全文
posted @ 2022-09-23 13:43 tiansz
阅读(348)
评论(0)
推荐(0)
2022年9月22日
去除列表中的重复值
摘要: lists = np.unique(list1)
阅读全文
posted @ 2022-09-22 09:40 tiansz
阅读(31)
评论(2)
推荐(0)
将dataframe单元格中的值存入list
摘要: generalized_word = np.array(generalized_word) generalized_word.tolist() generalized_word_list = [] for i in generalized_word: for j in i: generalized_
阅读全文
posted @ 2022-09-22 09:40 tiansz
阅读(320)
评论(0)
推荐(0)
删除列表中的np.nan值
摘要: while np.nan in standard_word_list: standard_word_list.remove(np.nan)
阅读全文
posted @ 2022-09-22 09:38 tiansz
阅读(24)
评论(0)
推荐(0)
pandas 读取 excel 时指定某些列
摘要: 单列 其中B就代表excel表中的列索引 standard_word = pd.read_excel('合并.xlsx', usecols='B') 多列 其中C:AK就代表excel表中的列索引 generalized_word = pd.read_excel('合并.xlsx', usecols
阅读全文
posted @ 2022-09-22 09:37 tiansz
阅读(764)
评论(0)
推荐(0)
excel按照某特殊字符分列
摘要: 上方菜单栏中的“数据”选项卡 ——> “分列”。之后更改为特定的字符,然后即可进行分列操作
阅读全文
posted @ 2022-09-22 09:35 tiansz
阅读(219)
评论(0)
推荐(0)
判断某字符串是否包含在字符串中
摘要: def guolv(ciyu): if '(' in ciyu: return 1 elif ',' in ciyu: return 2 else: return 3
阅读全文
posted @ 2022-09-22 09:32 tiansz
阅读(28)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
10
11
···
35
下一页