- Newest
- Most votes
- Most comments
Hello,
Just try if the below approaches works out
split_rows_collection = dyf.split_rows({“mybool": {"=": “1"}}, “is_true", “is_not_true”) split_rows_collection = dyf.split_rows({“mybool": {"=": "yes"}}, “is_true", “is_not_true”)
Thanks !
To split a DynamicFrame based on a boolean column using split_rows, use the following code: is_true, is_not_true = dyf.split_rows(comparison_dict={"mybool": {"==": True}}). This will create two DynamicFrames: is_true containing rows where the mybool column is True, and is_not_true containing rows where it is False.
Thank you for the suggestion, but the official documentation does not include '==' and this answer does not include it either: https://repost.aws/questions/QUB17wOFVCQouzYKaV4IVK7A/aws-glue-split-rows-operators#AN_nKgFwH-SkiEqe-L6RmmiQ. I tried your suggestion in my notebook and it still only creates a non-empty frame of the false evaluations. I updated my answer to show my test code.
Relevant content
- AWS OFFICIALUpdated 7 months ago

Thank you for the suggestions, but neither of those work.