我有2个星座,如所附档案所示。 预计_df和实际_df
在我的单位测试中,我试图检查两者是否平等。
我的法典
expected = map(lambda row: row.asDict(), expected_df.collect())
actual = map(lambda row: row.asDict(), actaual_df.collect())
assert expected = actual
Since both dfs are same but row order is different so assert fails here. What is best way to compare such dfs.