René's URL Explorer Experiment


Title: Bug - cannot convert float NaN to integer in merge_hapi · Issue #4 · hapi-server/tools-python · GitHub

Open Graph Title: Bug - cannot convert float NaN to integer in merge_hapi · Issue #4 · hapi-server/tools-python

X Title: Bug - cannot convert float NaN to integer in merge_hapi · Issue #4 · hapi-server/tools-python

Description: merge_hapi() throws an error when the resulting dataframe contains a column of ints and NaNs because Python does not allow converting NaN to int. Reproduce error: from hapiclient import hapi from hapiplot import hapiplot import hapitools...

Open Graph Description: merge_hapi() throws an error when the resulting dataframe contains a column of ints and NaNs because Python does not allow converting NaN to int. Reproduce error: from hapiclient import hapi from h...

X Description: merge_hapi() throws an error when the resulting dataframe contains a column of ints and NaNs because Python does not allow converting NaN to int. Reproduce error: from hapiclient import hapi from h...

Opengraph URL: https://github.com/hapi-server/tools-python/issues/4

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug - cannot convert float NaN to integer in merge_hapi","articleBody":"merge_hapi() throws an error when the resulting dataframe contains a column of ints and NaNs because Python does not allow converting NaN to int.\r\n\r\nReproduce error:\r\n```python\r\nfrom hapiclient import hapi\r\nfrom hapiplot import hapiplot\r\nimport hapitools\r\n\r\nopts = {'logging': False, 'usecache': True, 'cachedir': './hapicache' }\r\nstart = '2013-01-01T00:00:54Z'\r\nstop = '2013-01-01T06:00:54.000Z'\r\nserverA, datasetA, parametersA = 'https://cdaweb.gsfc.nasa.gov/hapi', 'OMNI2_H0_MRG1HR', 'DST1800'\r\nserverB, datasetB, parametersB = \"https://imag-data.bgs.ac.uk/GIN_V1/hapi\", \"cki/best-avail/PT1M/hdzf\", \"Field_Vector\"\r\n\r\ndataA, metaA = hapi(serverA, datasetA, parametersA, start, stop, **opts)\r\ndataB, metaB = hapi(serverB, datasetB, parametersB, start, stop, **opts)\r\ndataB = dataB[80:100]\r\nnewAB, metaAB = hapitools.merge_hapi(dataA, metaA, dataB, metaB, round_to_sec = True, fill_nan=False)\r\nhapiplot(newAB, metaAB)\r\n```\r\n```\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\nCell In[2], [line 14](vscode-notebook-cell:?execution_count=2\u0026line=14)\r\n     [12](vscode-notebook-cell:?execution_count=2\u0026line=12) dataB, metaB = hapi(serverB, datasetB, parametersB, start, stop, **opts)\r\n     [13](vscode-notebook-cell:?execution_count=2\u0026line=13) dataB = dataB[80:100]\r\n---\u003e [14](vscode-notebook-cell:?execution_count=2\u0026line=14) newAB, metaAB = hapitools.merge_hapi(dataA, metaA, dataB, metaB, round_to_sec = True, fill_nan=False)\r\n     [15](vscode-notebook-cell:?execution_count=2\u0026line=15) hapiplot(newAB, metaAB)\r\n\r\nFile ~/GitHub/hapi-server/tools-python/src/hapitools.py:123, in merge_hapi(data1, meta1, data2, meta2, how, round_to_sec, fill_nan)\r\n    [121](https://file+.vscode-resource.vscode-cdn.net/Users/tinsmcl1/GitHub/hapi-server/tools-python/~/GitHub/hapi-server/tools-python/src/hapitools.py:121) dt = merge_dtypes(data1, data2, trim='Time')\r\n    [122](https://file+.vscode-resource.vscode-cdn.net/Users/tinsmcl1/GitHub/hapi-server/tools-python/~/GitHub/hapi-server/tools-python/src/hapitools.py:122) new_data = new_df.to_records(index=False, column_dtypes={\"Time\": \"S30\"})\r\n--\u003e [123](https://file+.vscode-resource.vscode-cdn.net/Users/tinsmcl1/GitHub/hapi-server/tools-python/~/GitHub/hapi-server/tools-python/src/hapitools.py:123) new_data = np.array([tuple([nparray_unpack_to_list(e) for e in elm]) for elm in new_data], dtype=dt)\r\n    [124](https://file+.vscode-resource.vscode-cdn.net/Users/tinsmcl1/GitHub/hapi-server/tools-python/~/GitHub/hapi-server/tools-python/src/hapitools.py:124) new_data = np.array([tuple(i) for i in new_data], dtype=dt)\r\n    [126](https://file+.vscode-resource.vscode-cdn.net/Users/tinsmcl1/GitHub/hapi-server/tools-python/~/GitHub/hapi-server/tools-python/src/hapitools.py:126) return new_data, new_meta\r\n\r\nValueError: cannot convert float NaN to integer\r\n```\r\n","author":{"url":"https://github.com/tinsmcl1","@type":"Person","name":"tinsmcl1"},"datePublished":"2024-07-31T15:46:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/4/tools-python/issues/4"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fb203a93-0582-637d-3a10-61fbae22d8b9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id811C:135B7:F6D24F:14F8047:6A4DD5A8
html-safe-noncea0994b6e4b1350daffdde6a8d630a091270db6a7859bd5833b272ef4f7b26024
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTFDOjEzNUI3OkY2RDI0RjoxNEY4MDQ3OjZBNERENUE4IiwidmlzaXRvcl9pZCI6IjI3NTkxNzc5ODU5MTEwMTg5MjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac98dadc5b399f9addeb8341ce17bbe9fc84d183541faa5e2d7bc09213e464e888
hovercard-subject-tagissue:2440372894
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/hapi-server/tools-python/4/issue_layout
twitter:imagehttps://opengraph.githubassets.com/de1538b441a8be12034295072ae06257cbbdb1b17a4b3703c48797fd5c8434d4/hapi-server/tools-python/issues/4
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/de1538b441a8be12034295072ae06257cbbdb1b17a4b3703c48797fd5c8434d4/hapi-server/tools-python/issues/4
og:image:altmerge_hapi() throws an error when the resulting dataframe contains a column of ints and NaNs because Python does not allow converting NaN to int. Reproduce error: from hapiclient import hapi from h...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametinsmcl1
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
turbo-cache-controlno-preview
go-importgithub.com/hapi-server/tools-python git https://github.com/hapi-server/tools-python.git
octolytics-dimension-user_id22482204
octolytics-dimension-user_loginhapi-server
octolytics-dimension-repository_id825902843
octolytics-dimension-repository_nwohapi-server/tools-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id825902843
octolytics-dimension-repository_network_root_nwohapi-server/tools-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/hapi-server/tools-python/issues/4#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhapi-server%2Ftools-python%2Fissues%2F4
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhapi-server%2Ftools-python%2Fissues%2F4
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=hapi-server%2Ftools-python
Reloadhttps://github.com/hapi-server/tools-python/issues/4
Reloadhttps://github.com/hapi-server/tools-python/issues/4
Reloadhttps://github.com/hapi-server/tools-python/issues/4
Please reload this pagehttps://github.com/hapi-server/tools-python/issues/4
hapi-server https://github.com/hapi-server
tools-pythonhttps://github.com/hapi-server/tools-python
Notifications https://github.com/login?return_to=%2Fhapi-server%2Ftools-python
Fork 1 https://github.com/login?return_to=%2Fhapi-server%2Ftools-python
Star 0 https://github.com/login?return_to=%2Fhapi-server%2Ftools-python
Code https://github.com/hapi-server/tools-python
Issues 5 https://github.com/hapi-server/tools-python/issues
Pull requests 0 https://github.com/hapi-server/tools-python/pulls
Actions https://github.com/hapi-server/tools-python/actions
Projects https://github.com/hapi-server/tools-python/projects
Security and quality 0 https://github.com/hapi-server/tools-python/security
Insights https://github.com/hapi-server/tools-python/pulse
Code https://github.com/hapi-server/tools-python
Issues https://github.com/hapi-server/tools-python/issues
Pull requests https://github.com/hapi-server/tools-python/pulls
Actions https://github.com/hapi-server/tools-python/actions
Projects https://github.com/hapi-server/tools-python/projects
Security and quality https://github.com/hapi-server/tools-python/security
Insights https://github.com/hapi-server/tools-python/pulse
Bug - cannot convert float NaN to integer in merge_hapihttps://github.com/hapi-server/tools-python/issues/4#top
https://github.com/tinsmcl1
tinsmcl1https://github.com/tinsmcl1
on Jul 31, 2024https://github.com/hapi-server/tools-python/issues/4#issue-2440372894
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.