Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joins between dataframes and nil init of dataseries #110

Merged
merged 9 commits into from Aug 2, 2019

Conversation

@AtharvaKhare
Copy link
Contributor

commented Jul 15, 2019

Fixes #58.

innerJoin, outerJoin, leftJoin, rightJoin are joins based on rowNames only. Since row names are unique, resulting code is bit simpler (and faster).

Other joins are with arbitary columns. It is possible to combine both of them, but it will make the code much more complex.

There are multiple tests added to handle edge cases. Some tests may seem repetitive, because of output of joins, but they are kept to highlight differences between different methods.

#() asDataSeries was not working - 9857c5c fixes it.

Added innerJoin for dataframes using rowNames
Duplicate column names are renamed to `_x` and `_y` respectively.
Added outerJoin for dataframes using rowNames
Also dded a private method to get output columns of a join operation.
Added innerJoin of dataframes using columns as keys
Also added a `findAll: atColumn` and `findAllIndicesOf: atColumn` method to
gather rows with specific object at given column.

Note: The join operation does not sort keys.
Fixed bug preventing creation of empty DataSeries
`#() asDataSeries` used to fail.
Added relevant tests.
@AtharvaKhare

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2019

@olekscode Please review. Using individual commits to review will be much easier :)

@AtharvaKhare AtharvaKhare requested a review from olekscode Jul 17, 2019

@olekscode olekscode merged commit 95844d2 into PolyMathOrg:master Aug 2, 2019

2 of 3 checks passed

coverage/coveralls Coverage decreased (-0.8%) to 89.79%
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.