@@ -76,11 +76,13 @@ def check_identical_columns_and_rows(df, remove=False, verbosity=1) -> tuple:
7676 a list of tuples indicating which columns are duplicates,
7777 and a list of tuples indicating which rows are duplicates.
7878
79- Example:
79+ Examples:
80+ >>> import pandas as pd
81+ >>> from spotpython.utils.compare import check_identical_columns_and_rows
8082 >>> df = pd.DataFrame({"A": [1, 2, 3], "B": [1, 2, 3], "C": [4, 5, 6]})
8183 >>> check_identical_columns_and_rows(df, remove=False, verbosity=1)
82- Identical columns in DataFrame:
83- [('A', 'B')]
84+ Identical columns in DataFrame:
85+ [('A', 'B')]
8486 """
8587 # Check for exact identical columns
8688 identical_columns = []
@@ -130,11 +132,13 @@ def check_identical_columns_and_rows_with_tol(df, tolerance, remove=False, verbo
130132 a list of tuples indicating which columns are duplicates within the tolerance,
131133 and a list of tuples indicating which rows are duplicates within the tolerance.
132134
133- Example:
135+ Examples:
136+ >>> import pandas as pd
137+ >>> from spotpython.utils.compare import check_identical_columns_and_rows_with_tol
134138 >>> df = pd.DataFrame({"A": [1, 1, 3], "B": [1, 1.01, 3], "C": [4, 5, 6]})
135139 >>> check_identical_columns_and_rows_with_tol(df, tolerance=0.05, remove=False, verbosity=1)
136- Identical columns within tolerance in DataFrame:
137- [('A', 'B')]
140+ Identical columns within tolerance in DataFrame:
141+ [('A', 'B')]
138142 """
139143
140144 # Function to compare rows/columns with tolerance
0 commit comments