Title: pandas warning in `data.get_turbine_types()` · Issue #143 · wind-python/windpowerlib · GitHub
Open Graph Title: pandas warning in `data.get_turbine_types()` · Issue #143 · wind-python/windpowerlib
X Title: pandas warning in `data.get_turbine_types()` · Issue #143 · wind-python/windpowerlib
Description: Calling wpl.data.get_turbine_types() with pandas 2.2.3 throws the following warning at windpowerlib/data.py:103: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version....
Open Graph Description: Calling wpl.data.get_turbine_types() with pandas 2.2.3 throws the following warning at windpowerlib/data.py:103: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is depreca...
X Description: Calling wpl.data.get_turbine_types() with pandas 2.2.3 throws the following warning at windpowerlib/data.py:103: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is depreca...
Opengraph URL: https://github.com/wind-python/windpowerlib/issues/143
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pandas warning in `data.get_turbine_types()`","articleBody":"Calling `wpl.data.get_turbine_types()` with pandas 2.2.3 throws the following warning at `windpowerlib/data.py:103`:\r\n```console\r\n FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`\r\n```\r\n\r\nThis is caused by `.fillna(False)` in the following:\r\n```python\r\ncurves_df = pd.merge(\r\n p_curves_df, cp_curves_df, how=\"outer\", sort=True\r\n).fillna(False)\r\n```\r\n\r\nI am no developer, but I did some reading about the warning and this seems to be a clean (and possible the \"correct\") way to get rid of it:\r\n```python\r\nwith pd.option_context('future.no_silent_downcasting', True):\r\n curves_df = pd.merge(\r\n p_curves_df, cp_curves_df, how=\"outer\", sort=True\r\n ).fillna(False).infer_objects()\r\n```\r\n","author":{"url":"https://github.com/mkaut","@type":"Person","name":"mkaut"},"datePublished":"2024-09-26T08:23:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/143/windpowerlib/issues/143"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:26f7845c-dc5f-6980-00b8-8c00bfdf69f6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F2E:3AFAA9:D8C452:1241641:698E484D |
| html-safe-nonce | 677282daefca46e2f16111604660c0eadb254d3eda1c33d159ef46c54fe0f94b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjJFOjNBRkFBOTpEOEM0NTI6MTI0MTY0MTo2OThFNDg0RCIsInZpc2l0b3JfaWQiOiI3MTUwODc2MTc0NTYxNzI0NDkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ccedae99954d5c980adc1acc0a308e30c7dad8e4ea8937a0d2cae9c3dff217b2 |
| hovercard-subject-tag | issue:2549875207 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/wind-python/windpowerlib/143/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1431afb263a497f5c7b9c8acf371ac2a1bb012ec2088dda56f3591d6c16b1cba/wind-python/windpowerlib/issues/143 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1431afb263a497f5c7b9c8acf371ac2a1bb012ec2088dda56f3591d6c16b1cba/wind-python/windpowerlib/issues/143 |
| og:image:alt | Calling wpl.data.get_turbine_types() with pandas 2.2.3 throws the following warning at windpowerlib/data.py:103: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is depreca... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mkaut |
| hostname | github.com |
| expected-hostname | github.com |
| None | a5632af64f7fed7bff1d6a428d1aca1b94fa7a48f760de2d39d9b1effdbf0082 |
| turbo-cache-control | no-preview |
| go-import | github.com/wind-python/windpowerlib git https://github.com/wind-python/windpowerlib.git |
| octolytics-dimension-user_id | 21263042 |
| octolytics-dimension-user_login | wind-python |
| octolytics-dimension-repository_id | 66651306 |
| octolytics-dimension-repository_nwo | wind-python/windpowerlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 66651306 |
| octolytics-dimension-repository_network_root_nwo | wind-python/windpowerlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3dda52e29a416820ced574e74040033b820613a2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width