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

Switch from pandas to polars #4

Merged
merged 1 commit into from
Jun 20, 2023
Merged

Switch from pandas to polars #4

merged 1 commit into from
Jun 20, 2023

Conversation

kaitj
Copy link
Contributor

@kaitj kaitj commented Jun 20, 2023

Proposed changes
Making the switch from pandas to polars early on in the development of this utility library for performance related reasons.

Types of changes
What types of changes does your code introduce? Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (if none of the other choices apply)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you are unsure about any of the choices, don't hesitate to ask!

  • Changes have been tested to ensure that fix is effective or that a feature works.
  • Changes pass the unit tests
  • Code has been run through the poe quality task
  • I have included necessary documentation or comments (as necessary)
  • Any dependent changes have been merged and published

Notes
All PRs will undergo the unit testing before being reviewed. You may be requested to explain or make additional changes before the PR is accepted.

- Switches dataframe library from pandas 2.0.2 to polars 0.18.3 with
numpy plugin for performance related reasons
- Update use of FCSV_FIELDNAMES to a dict to be able to easily update
pl.Dataframe dtypes
- Directly use fid_num and label to grab desired fiducial
- Use of scan_csv instead of read_csv for performance since the fcsv file would need to
be read each time a specific fiducial is to be extracted
@kaitj kaitj added the maintenance Updates or improvements that do not change functionality of the code label Jun 20, 2023
@github-actions github-actions bot requested a review from tkkuehn June 20, 2023 15:11
@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #4 (aca87ad) into main (adc4194) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #4   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           83        83           
=========================================
  Hits            83        83           
Components Coverage Δ
afids-utils_io ∅ <ø> (∅)

@kaitj kaitj merged commit 4a4de64 into afids:main Jun 20, 2023
7 checks passed
@kaitj kaitj deleted the maint/polars branch June 20, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Updates or improvements that do not change functionality of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants