金融量化AI研究--Claude, Python

这里用来记录一些本人运用Claude编程的心得或笔记

导航

2021年1月5日 #

导入excel,csv的N种方式

摘要: 方法一:将表中的某一列按str/date读入 file_path = r'F:\Data Store\20089交易清单' file_name ='RB30A1-0900042.xls' df = pd.read_excel(file_path +'\\'+ file_name, dtype={'交 阅读全文

posted @ 2021-01-05 16:03 chengjon 阅读(656) 评论(0) 推荐(0)

Python格式化函数 format()

摘要: format在python2.6 之后引入,替代了原先的 %,显得更加优雅 format函数是一种格式化输出字符串的函数(str.format), 基本语法是通过 和 : 来代替以前的% 中可以填写后面元组中的下标 也可以填写后面的字段名 % 需要知道替换字符的类型,format则不需要 格式化字符 阅读全文

posted @ 2021-01-05 11:39 chengjon 阅读(578) 评论(0) 推荐(0)

用python打开文件夹的三种方式

摘要: 一、利用explorer.exe import os # 利用explorer.exe执行 start_directory = r'C:\代码\软件包' os.system("explorer.exe %s" % start_directory) 二、用os.startfile import os 阅读全文

posted @ 2021-01-05 09:44 chengjon 阅读(2018) 评论(1) 推荐(1)