Skip to content

Conversation

@hashstat
Copy link
Contributor

@hashstat hashstat commented Jul 15, 2021

This change is made as suggested by the pandas FutureWarning to prevent
those warnings.

See #1261

  • Closes pandas FutureWarning when casting type in DatetimeIndex #1261
  • I am familiar with the contributing guidelines
  • Tests added
  • Updates entries to docs/sphinx/source/api.rst for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels and Milestone are assigned to the Pull Request and linked Issue.

This change is made as suggested by the pandas FutureWarning to prevent
those warnings.

See #1261
Copy link
Member

@kandersolar kandersolar left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @hashstat!

FYI to the other maintainers, looks like there's a handful of places in the tests that need this update as well: https://dev.azure.com/solararbiter/pvlib%20python/_build/results?buildId=5277&view=logs&j=80999419-997d-54cc-7d9e-fafbf8111e17&t=fe7e5fe7-75d4-55e3-99ba-184521a271ef&l=232

(:issue:`1241`, :pull:`1242`)
* Corrected :py:func:`~pvlib.solarposition.spa_python` to avoid a future warning. (:pull:`1256`)
* Changed deprecated use of ``.astype()`` to ``.view()`` in :py:mod:`~pvlib.solarposition`.
(:issue:`1261`, :pull:`1262`)
Copy link
Member

Choose a reason for hiding this comment

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

Could merge this with the entry above it, nbd though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Merged as suggested.

@wholmgren wholmgren added this to the 0.9.0 milestone Jul 27, 2021
@wholmgren
Copy link
Member

Thanks @hashstat!

@wholmgren wholmgren merged commit 4ba9871 into pvlib:master Jul 27, 2021
@hashstat hashstat deleted the 1261-pandas-futurewarning-fix branch August 2, 2021 19:59
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.

pandas FutureWarning when casting type in DatetimeIndex

3 participants