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

feat: gaze_dataframe.unnest() supports multi-col unnest #592

Merged
merged 11 commits into from
Nov 3, 2023

Conversation

theDebbister
Copy link
Member

@theDebbister theDebbister commented Oct 6, 2023

Description

Gaze dataframe now supports unnest for multiple columns at the same time. If no args are given, it will unnest all possible values.
Fixes issue #446

Implemented changes

  • Add support for passing a list of column names as the input_column in GazeDataFrame.unnest()
  • can only specify output cols if only one input col needs to be unnested
  • Automatically infer list of columns to be unnested if None

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f9c43dd) 100.00% compared to head (fd9f0fb) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #592   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           52        52           
  Lines         2349      2352    +3     
  Branches       588       590    +2     
=========================================
+ Hits          2349      2352    +3     
Files Coverage Δ
src/pymovements/dataset/dataset_files.py 100.00% <100.00%> (ø)
src/pymovements/gaze/gaze_dataframe.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@theDebbister theDebbister marked this pull request as ready for review October 6, 2023 15:21
Copy link
Contributor

@dkrako dkrako left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this great work!

There are three details which need some improvement.
Regarding the name of the input column argument, let's vote for the name on friday.

I myself am in favor of input_column.

src/pymovements/gaze/gaze_dataframe.py Show resolved Hide resolved
src/pymovements/gaze/gaze_dataframe.py Outdated Show resolved Hide resolved
src/pymovements/gaze/gaze_dataframe.py Outdated Show resolved Hide resolved
src/pymovements/gaze/gaze_dataframe.py Outdated Show resolved Hide resolved
@github-actions github-actions bot added the enhancement New feature or request label Oct 20, 2023
@dkrako dkrako linked an issue Nov 3, 2023 that may be closed by this pull request
2 tasks
@dkrako dkrako self-requested a review November 3, 2023 09:37
@dkrako dkrako enabled auto-merge (squash) November 3, 2023 10:34
Copy link
Contributor

@dkrako dkrako left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your endurance while finishing this PR!

@dkrako dkrako merged commit d666422 into main Nov 3, 2023
18 checks passed
@dkrako dkrako deleted the feature/support-list-unnested branch November 3, 2023 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for list of columns to be unnested
2 participants