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

Faster dataframe validation #109

Merged
merged 39 commits into from
Jan 30, 2023
Merged

Faster dataframe validation #109

merged 39 commits into from
Jan 30, 2023

Conversation

fsoubelet
Copy link
Member

@fsoubelet fsoubelet commented Jan 30, 2023

This addresses #108

The main changes are:

  • Rework of the tfs.frame.validate function logic and removal of the old is_not_finite function and .applymap call.
  • Addition of a check to detect lists / tuples elements with a custom vectorized function applied to each column.
  • Use of the DataFrame.isna() with the right context options for the finite-values part of the checks.
  • Inclusion of a methodology admonition in validate's docstring

The speedup, while not as nice as skipping validation like in #107, is nice. One can see a ~x5 speedup on a 873M file (sliced fcc, 171k rows and 236 columns). See below a quick test.

New Validation Old Validation (v3.2.1)
Screenshot 2023-01-30 at 13 13 51 old

@fsoubelet fsoubelet added Type: Feature A (suggetion for a) new feature or enhancement in functionality. Minor labels Jan 30, 2023
@fsoubelet fsoubelet requested a review from JoschD January 30, 2023 12:37
@fsoubelet fsoubelet self-assigned this Jan 30, 2023
Copy link
Member

@JoschD JoschD left a comment

Choose a reason for hiding this comment

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

<3

@fsoubelet fsoubelet merged commit 45ebb79 into master Jan 30, 2023
@fsoubelet fsoubelet deleted the faster_validation branch January 30, 2023 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature A (suggetion for a) new feature or enhancement in functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants