python
呜啦吧哈
这个作者很懒,什么都没留下…
展开
-
统计计数
from collections import Countern = ['a','b','c','a','d','d']m = dict(Counter(n))输出键是元素,值是元素出现的次数print(m){'a': 2, 'b': 1, 'c': 1, 'd': 2}原创 2021-05-20 14:00:32 · 120 阅读 · 0 评论 -
专利复审无效收集
专利复审无效采集#%%from selenium import webdriverfrom selenium.common.exceptions import NoSuchElementExceptionimport time# import xlwt# import sysfrom selenium import webdriverfrom selenium.webdriver import ChromeOptionsfrom bs4 import BeautifulSoupi.原创 2021-01-07 16:40:20 · 195 阅读 · 0 评论 -
python表格合并处理
提取表格#%%从pdf中提取表格import tabuladf = tabula.read_pdf("E:\\testdata\\zhushengnan\\Controlled Substances by CSA Schedule-17.pdf", pages='all')表头处理import pandas as pddf_result = []for df_1 in df: column = df_1.columns.values.tolist() df_c .原创 2020-11-04 16:15:45 · 823 阅读 · 1 评论 -
dataframe数据处理
创建dataframedf1 = pd.DataFrame(data1, columns = ["a", "b"])ndarray转化为DataFrameIn:type(y)Out:numpy.ndarrayfrom pandas import DataFramepre = DataFrame(y,columns=['pre'])import pandas a...原创 2019-01-09 11:31:45 · 798 阅读 · 0 评论