Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test_df_shape():
- df = pd.DataFrame({"a": [1, 2, 3]})
- df2 = pd.DataFrame({"a": [4, 5, 6]})
- def object_generator():
- return deepcopy([df, df2])
- def criteria(output):
- return len(output) == 6
- functions = [
- getattr(pd, attr) for attr in dir(pd) if isinstance(getattr(pd, attr), Callable)
- ]
- path = find_function_match(object_generator, criteria, functions)
- assert path.__name__ == "concat"
Advertisement
Add Comment
Please, Sign In to add comment