Skip to content

fix: serialize Pandas NaN values into LineProtocol #648

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

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Conversation

bednar
Copy link
Contributor

@bednar bednar commented Apr 2, 2024

Closes #590

Proposed Changes

Fixed serialisation Pandas NaN values into LineProtocol.

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@bednar bednar requested a review from karel-rehor April 2, 2024 12:21
@bednar bednar marked this pull request as ready for review April 2, 2024 12:22
@@ -20,7 +20,8 @@ def _itertuples(data_frame):


def _not_nan(x):
return x == x
from ...extras import pd
Copy link
Contributor

Choose a reason for hiding this comment

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

I see this same import occurs on line 91. Wouldn't it be more efficient to import this once at the head of the file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@karel-rehor, nice catch! Thank you 👍. I've uploaded the fixed version.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.41%. Comparing base (a645ea9) to head (1afb72e).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #648      +/-   ##
==========================================
- Coverage   90.42%   90.41%   -0.02%     
==========================================
  Files          39       39              
  Lines        3509     3505       -4     
==========================================
- Hits         3173     3169       -4     
  Misses        336      336              

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

Copy link
Contributor

@karel-rehor karel-rehor left a comment

Choose a reason for hiding this comment

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

Tests pass. One small issue updated. Everything else looks OK.

@bednar bednar merged commit e2cb42e into master Apr 16, 2024
15 checks passed
@bednar bednar deleted the nan-values branch April 16, 2024 06:01
@bednar bednar added this to the 1.42.0 milestone Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WriteApi.write does not support pandas' nullable integer
3 participants