I have two pandas data frame like below :-
DF1
date1 hours value Field count1
1 2021-01-15 9 eps EPS 770915
2 2021-01-22 9 eps EPS 797503
DF2
date1 hours value Field count1
0 2021-01-09 9 eps EPS 0
1 2021-01-10 9 eps EPS 0
2 2021-01-11 9 eps EPS 0
3 2021-01-12 9 eps EPS 0
4 2021-01-13 9 eps EPS 0
5 2021-01-14 9 eps EPS 0
6 2021-01-15 9 eps EPS 0
7 2021-01-16 9 eps EPS 0
8 2021-01-17 9 eps EPS 0
9 2021-01-18 9 eps EPS 0
10 2021-01-19 9 eps EPS 0
11 2021-01-20 9 eps EPS 0
12 2021-01-21 9 eps EPS 0
13 2021-01-22 9 eps EPS 0
I want output like below :-
Result :-
date1 hours value Field count1
0 2021-01-09 9 eps EPS 0
1 2021-01-10 9 eps EPS 0
2 2021-01-11 9 eps EPS 0
3 2021-01-12 9 eps EPS 0
4 2021-01-13 9 eps EPS 0
5 2021-01-14 9 eps EPS 0
6 2021-01-15 9 eps EPS 770915
7 2021-01-16 9 eps EPS 0
8 2021-01-17 9 eps EPS 0
9 2021-01-18 9 eps EPS 0
10 2021-01-19 9 eps EPS 0
11 2021-01-20 9 eps EPS 0
12 2021-01-21 9 eps EPS 0
13 2021-01-22 9 eps EPS 797503
data type of columns DF1 and DF2 are like :-
date1 object
hours int64
value object
Field object
count1 int64
The DF2 always contain 14 days and DF1 contain variable days which is between 1 to 14. I want result dataframe which contain missing days field with zero from 2nd dataframe.
question from:
https://stackoverflow.com/questions/65845416/merge-one-pandas-dataframe-to-another-and-remove-value-which-is-present-in-first 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…