MCPcopy Create free account
hub / github.com/datapane/datapane / check_df_equal

Function check_df_equal

python-client/tests/__init__.py:4–13  ·  view source on GitHub ↗

Wraps pd.assert_frame_equal whilst processing dfs and ignoring the order of the columns. NOTE - this mutates the dfs

(left: pd.DataFrame, right: pd.DataFrame, **kwargs)

Source from the content-addressed store, hash-verified

2
3
4def check_df_equal(left: pd.DataFrame, right: pd.DataFrame, **kwargs):
5 """
6 Wraps pd.assert_frame_equal whilst processing dfs and ignoring the order of the columns.
7 NOTE - this mutates the dfs
8 """
9 from datapane.common.df_processor import process_df
10
11 left = process_df(left)
12 right = process_df(right)
13 pd.testing.assert_frame_equal(left, right, check_like=True, **kwargs)

Callers

nothing calls this directly

Calls 1

process_dfFunction · 0.90

Tested by

no test coverage detected