# python_learning **Repository Path**: jmagikcing/python_learning ## Basic Information - **Project Name**: python_learning - **Description**: 学习、联系python的一些代码 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-09 - **Last Updated**: 2022-04-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # python_learning #### 介绍 学习、联系python的一些代码 #### 软件架构 软件架构说明 #### merge_excel.py 1. 使用 在windows下 的命令 ```shell python D:\4.code\python\merge_excel.py -i list head list # example list # https://blog.csdn.net/nanfeibuyi/article/details/84945935 ``` ![cmd 示例](https://images.gitee.com/uploads/images/2020/1109/111430_de504e28_5489432.png "屏幕截图.png") ![list 示例](https://images.gitee.com/uploads/images/2020/1109/111629_70d81e6f_5489432.png "屏幕截图.png") 2. 环节安装 window 安装 Python 3.8.0 并安装 相应的包 ``` shell pip3 install pandas pip3 install xlrd pip3 install openpyxl ``` 3. pandas 学习 ``` shell # 获取sheet列表 reader = pandas.ExcelFile(line) sheet_names = reader.sheet_names # 判断列名是否存在 "只认领保留的,删除的不用反馈" in raw_sheet_data.columns # 获取列表是个array # dataframe是否为空 clean_sheet_data.empty: ### 对于字典值获取之前需要判断 # 判断建是否存在 # 再判断值是否存在 if reason in clean_data_delay_count[week]: if clean_data_delay_count[week][reason] :+1: ### 对于dataframe中的数据按照某个列进行归类 clean_data_delay['子项目编号'].groupby([clean_data_delay['结题周'],clean_data_delay['信息分析延期原因归类']]).count() ``` #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)