With this design

df2= pd.read_excel(self.filename1, skiprows=2, header=None, usecols=[3, 4, 5, 20]).drop(labels=[0,1,2,3, 4,5,6,7,8,9,10],axis=0)
df3= pd.read_excel(self.filename2, header=None, usecols=[3, 4, 5, 12]).drop(labels=[0,1,2,3,4,5,6,7,8, 9,10,11,12,13,14],axis=0)
result= df2.loc[df2.ne(df3.to_numpy()).any(axis=1)]
result2= df3.loc[df3.ne(df2.to_numpy()).any(axis=1)]
datafr= pd.concat([d.reset_index(drop=True) for d in [result, result2]], axis=1)
datafr.to_excel(f'{self.path}/Result.xlsx', sheet_name='Sheet', startrow=2, startcol=0, header=None, index=False)

I combine frames and get columns that go in order one after another (column A,B,C,D,E,F)

how to get such a result that would skip through column D (A,B,C;D;E,F,G)

nothing is clear.

strawdog2022-01-14 07:36:15

@strawdog updated the question.

Аполлинарий Кодоправ2022-01-14 07:48:46

In excel, the parameter spacing between columns is absent, but in html there is such a parameter. Beauty in excel is done by parameters: column width, left/right/center/top/bottom alignment.

nick_n_a2022-01-14 08:00:25

@MaxU for addition, the code for which I asked was not quite suitable for me in terms of convenience, so I combined the frames datafr= pd.concat([d.reset_index(drop=True) for d in [result, result2]], axis=1) and I'm looking for a way to separate them, yes, just like in the topic that you cited.

Аполлинарий Кодоправ2022-01-14 08:19:21