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

DOC: fix to_numpy explanation for tz aware data #24595

Merged
merged 1 commit into from Jan 3, 2019

Conversation

jorisvandenbossche
Copy link
Member

Some clean-up now to_numpy preserves timezone and no longer converts to UTC datetime64 by default (after #24024), the example in timeseries.rst was failing due to that.

@jorisvandenbossche jorisvandenbossche added this to the 0.24.0 milestone Jan 3, 2019
2. A ``datetime64[ns]`` -dtype :class:`ndarray`, where the values have
been converted to UTC and the timezone discarded

Timezones may be preserved with ``dtype=object``
Copy link
Member Author

Choose a reason for hiding this comment

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

@TomAugspurger can you double check here? But it seems this section was duplicated (added each time by two related PRs, probably some merging/rebasing left-over)

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

2. A ``datetime64[ns]`` -dtype :class:`ndarray`, where the values have
been converted to UTC and the timezone discarded

Timezones may be preserved with ``dtype=object``
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -2425,21 +2425,25 @@ a convert on an aware stamp.
.. note::

Using :meth:`Series.to_numpy` on a ``Series``, returns a NumPy array of the data.
These values are converted to UTC, as NumPy does not currently support timezones (even though it is *printing* in the local timezone!).
NumPy does not currently support timezones (even though it is *printing* in the local timezone!),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the statement about printing is true anymore.

@codecov
Copy link

codecov bot commented Jan 3, 2019

Codecov Report

Merging #24595 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24595   +/-   ##
=======================================
  Coverage   92.36%   92.36%           
=======================================
  Files         166      166           
  Lines       52497    52497           
=======================================
  Hits        48490    48490           
  Misses       4007     4007
Flag Coverage Δ
#multiple 90.79% <ø> (ø) ⬆️
#single 43.03% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/base.py 97.75% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 479ddcb...c8e1cf1. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jan 3, 2019

Codecov Report

Merging #24595 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24595   +/-   ##
=======================================
  Coverage   92.36%   92.36%           
=======================================
  Files         166      166           
  Lines       52497    52497           
=======================================
  Hits        48490    48490           
  Misses       4007     4007
Flag Coverage Δ
#multiple 90.79% <ø> (ø) ⬆️
#single 43.03% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/base.py 97.75% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 479ddcb...c8e1cf1. Read the comment docs.

@jreback jreback merged commit cbe9648 into pandas-dev:master Jan 3, 2019
@jreback
Copy link
Contributor

jreback commented Jan 3, 2019

thanks @jorisvandenbossche

@jorisvandenbossche jorisvandenbossche deleted the doc-dta-to-numpy branch January 3, 2019 21:13
@jorisvandenbossche
Copy link
Member Author

jorisvandenbossche commented Jan 3, 2019

Tom actually put a review comment, but OK, will fix another time :)

Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants