fix out of bounds exception when calling aggregate and distinct…#146
Open
mcoady wants to merge 5 commits intoDataHaskell:mainfrom
Open
fix out of bounds exception when calling aggregate and distinct…#146mcoady wants to merge 5 commits intoDataHaskell:mainfrom
aggregate and distinct…#146mcoady wants to merge 5 commits intoDataHaskell:mainfrom
Conversation
…n a dataframe with no rows; split out `decodeSeparated` from `readSeparated`
Contributor
|
@mcoady great catch. thanks for reporting bug and fixing! Would it be possible to add a couple of tests? The examples that you give are pretty much good to go, just add it here: https://github.com/DataHaskell/dataframe/blob/48aa6cccd650864313489250a359eddf7e75b0d9/tests/Operations/GroupBy.hs Just the case where |
Contributor
Author
|
No worries! Have added a test - although in |
Contributor
|
Agreed. Makes more sense in Aggregation. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…on a dataframe with no rows. Additionally, split out
decodeSeparatedfromreadSeparatedDescription
A pipeline I was using was failing with some inputs. The proposed fix would make the behaviour the same as in polars and pandas (which is to return the dataframe with no rows).
I suspect there's a better fix to do at a lower level, but I'd have to dig into things a bit more from what I can see (as it wasn't immediately obvious).
Noticed a similar out of bounds issue calling
distincton a dataframe with no rows, fix is similar.The other thing was to have
decodeSeperatedsplit out fromreadSeperatedso as to be able to deal withByteStringdirectly (as that's what I'm looking at for my use case).Behaviour before
Doing a basic
groupByandaggregate-So far so good.
The issue happens if the initial dataframe has no rows.
groupBysucceeds, butaggregatefails -Behaviour after