Skip to content

Instantly share code, notes, and snippets.

@beneon
beneon / combine.py
Created Apr 26, 2020
数据清理-规陪带教数据
View combine.py
# 2020-4-26编码,将三个文件处理以后合并成一个excel
import os
import pandas as pd
import re
# 从第三行开始,第一列医生名称,第二列进修生带教数量,第三列规陪数量,第四列月份,第五列年份
xl_file_path = os.path.join('datafile','summary.xlsx')
df = pd.read_excel(xl_file_path)
#原始表其实是两个表格的联合,先拆成basic和detail两个表
@beneon
beneon / faker_gen.py
Created Jan 15, 2020
数据生成代码
View faker_gen.py
from faker import Faker
import pandas as pd
import os
fk = Faker('zh_CN')
class PtRecord:
def __init__(self,fk):
@beneon
beneon / fetchPubmedAbstract.py
Last active Jul 29, 2019
ben's code snippet
View fetchPubmedAbstract.py
import requests
import os
import xml.etree.ElementTree as ET
import pyperclip
import argparse
import re
reLink = re.compile(r'https://www.ncbi.nlm.nih.gov/pubmed/(\d+)')
parser = argparse.ArgumentParser(
"-i pmid -l pubmed link")
parser.add_argument('-i')