当前位置:网站首页>13 ways of Excel automation to avoid repeating tasks in Microsoft Excel
13 ways of Excel automation to avoid repeating tasks in Microsoft Excel
2022-07-23 20:25:00 【Knowledge fatness】
More than a year ago , I began to learn when I was a data analyst Python. The company I worked for at that time was all about Excel Of . Every month I have to clean up and merge the nearly collected data from all over the world 100 A different file —— As you can imagine , It's a nightmare ! Due to the nature of the customer , It's an old story , That is, the turnaround time of delivery analysis is very urgent , Cause the pressure bottleneck to appear again .
first , I use VBA From some of my monthly work , But I found that if the data set format is slightly different every month , It will become quite rigid . I also met Excel The serious problem of collapse , Especially with the growth of data . And then I found out Python, It really changed my life ! When some file formats are different , I can easily update and modify my Python Script . No more files crashed and lost my work .
1. Import Excel And make sure the date is the date time object
First , You need to Excel File read in Pandas Data frame . One of the problems I encountered when I first used data frames was using dates . When I understand datetime Type , This turns on formatting 、 Possibility of date calculation and so on .
pd.read_excel(file_path, parse_dates=['date_col1', 'date_col2']
Actual test data
Date test data :02date.zip
ndate = pd.read_excel(" date .xlsx",parse_dates=[' Date of birth ',' Sampling time ',' Registration time '])
here ,file_path It's what you need to clean up Excel The location of the file , And file name and file extension . take datecol1 And replace datecol2 Column names with dates — You can always add or remove more content from the list , Or delete the second
边栏推荐
- el-upload实现上传文件预览
- 太全了,建议收藏!SAP究竟可以为企业带来什么?
- MongoDB-查询语句中$exists以及结合$ne、$nin、$nor、$not使用介绍
- 扫雷游戏
- 【ASP.NET Core】选项模式的相关接口
- Meiker Studio - Huawei 14 day Hongmeng equipment development practical notes 4
- Win11小组件怎么添加待办事项?Win11添加待办事项小组件的方法
- Leetcode 209. subarray with the smallest length
- Atelier macoll - notes de développement de la secte de l'ours 2
- 【Unity项目实践】关卡解锁
猜你喜欢

解决1秒钟内,用户快速点击,重复请求的问题

安装Win11找不到固态硬盘如何解决?

MongoDB-查询语句中$exists以及结合$ne、$nin、$nor、$not使用介绍

数组——59. 螺旋矩阵 II

Leetcode 219. duplicate Element II exists (yes, resolved)

Failure after reinstalling the system (error: Reboot and select proper boot device or insert boot media in selected boot device)

AtCoder B - Pizza

BM14 链表的奇偶重排

Leetcode 238. product of arrays other than itself

How to reset the computer system? The method is actually very simple
随机推荐
AtCoder B - Pizza
Prepare for pressure test with JMeter and visualvw
Leetcode 152. product maximum subarray (brute force cracking can actually pass!)
20.ref与props
数组——59. 螺旋矩阵 II
dokcer镜像理解
2022/7/21 training summary
千呼万唤,5G双卡双通到底有多重要?
Atelier macoll - notes de développement de la secte de l'ours 2
源启数字化:既有模式,还是开源创新?|砺夏行动
安装svn 汉化包 也不能设置中文[通俗易懂]
解决1秒钟内,用户快速点击,重复请求的问题
梅科爾工作室-小熊派開發筆記2
Meiker Studio - Huawei 14 day Hongmeng equipment development practical notes 6
138-查询案例-涉及知识点:forEach遍历&computed计算属性&v-for循环
Task03 | return
How to reset the computer system? The method is actually very simple
Win11小组件怎么添加待办事项?Win11添加待办事项小组件的方法
AtCoder B - Pizza
Uncover the working principle of solid state disk