摘要: import pandas as pd from sqlalchemy import create_engine # read in the Statal file df = pd.read_stata('1.dta') # create a connection to the MySQL data 阅读全文
posted @ 2023-03-19 20:56 myrj 阅读(29) 评论(0) 推荐(0) 编辑
摘要: . export excel using "D:\statashu\221.xls", firstrow(variables) nolabel //将当前表导出为xls,第一行作为标题,没有值标签 //导入xls,第一行作为变量名 import excel "D:\statashu\221.xls" 阅读全文
posted @ 2023-03-19 20:48 myrj 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 下载https://github.com/mli/autocut 解压缩:pip install git+https://github.com/mli/autocut.git D:\c-理论\tool\autocut-main\autocut-main> python setup.py instal 阅读全文
posted @ 2023-03-19 20:26 myrj 阅读(94) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd df=pd.read_excel('bb.xlsx') column = list(df.columns) for i in range(0, len(df)): print(df.iloc[i][column[0]],df.iloc[i][column[1] 阅读全文
posted @ 2023-03-19 14:57 myrj 阅读(783) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd file=pd.read_excel('bb.xlsx') column = list(file.columns) for i in range(len(file)): x = [file.iloc[i][x] for x in range(len(colum 阅读全文
posted @ 2023-03-19 14:45 myrj 阅读(137) 评论(0) 推荐(0) 编辑
摘要: import pdfplumber import pandas as pd from PIL import Image pdf = pdfplumber.open("xue1.pdf") #Load page_0 p0 = pdf.pages[0] table = p0.extract_table( 阅读全文
posted @ 2023-03-19 12:13 myrj 阅读(19) 评论(0) 推荐(0) 编辑
摘要: * 加载一个Stata数据集 sysuse auto * 在Stata中执行Python代码 python: import pandas as pd import pymysql import stata_setup stata_setup.config("c:\python37\python.ex 阅读全文
posted @ 2023-03-19 07:27 myrj 阅读(34) 评论(0) 推荐(0) 编辑