Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
138 views
in Technique[技术] by (71.8m points)

python - How to find missing data based on timeframe (Date and Hour) in excel?

I have quite large time-series data from 2000 - 2020 by hourly. But the problem is I have been stuck in preparing the data. I want to look for missing data and want to calculate how many percentages of the missing data.

The data will be like this

Location Date Data_1 Data_2
ABC 01/01/2000 00:00 20 4
ABC 01/01/2000 01:00 20 4
ABC 01/01/2000 02:00 20 4
ABC 01/01/2000 05:00 20 4
ABC 01/01/2000 06:00 20 4
question from:https://stackoverflow.com/questions/65896423/how-to-find-missing-data-based-on-timeframe-date-and-hour-in-excel

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Create a table of all the valid times between 2000-01-01 and 2020-12-31. To do this, format column B as yyyy-mm-dd hh:mm.

In cell B1, input the first time (2000-01-01 00:00).

In cell B2 input the formula =B1+1/24.

Copy the formula in B2 down about 180,000 times Then do a VLOOKUP or similar to your source data.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...