Add foreach Functionality for DataFrame Operations #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces the foreach method to the DataFrame API, enabling users to apply a closure to each row of the DataFrame asynchronously. The foreach method iterates over the rows of the DataFrame and applies the provided closure, allowing users to perform custom operations or side effects on each row.
Details:
Implemented the foreach method in the DataFrame struct, which asynchronously applies a closure to each row.
Added support for asynchronous iteration over the rows of the DataFrame using the foreach method.
Ensured error handling and propagation of errors encountered during the iteration process.
Testing:
Added unit tests to validate the functionality of the foreach method.
Tested the foreach method with various scenarios, including empty DataFrames, DataFrames with different numbers of rows, and DataFrames with different column types.
Conducted integration testing to ensure compatibility with other DataFrame operations and functionalities.
Additional Notes:
The foreach method provides a convenient way to perform asynchronous operations on DataFrame rows without collecting the DataFrame into memory.
Users should be aware of the potential concurrency issues and thread safety considerations when using the foreach method in multi-threaded environments.