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

DEPR: rename Timestamp.offset to .freq #13593

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@sinhrks
Member

sinhrks commented Jul 9, 2016

  • closes #12160
  • tests added / passed
  • passes git diff upstream/master | flake8 --diff
  • whatsnew entry

@sinhrks sinhrks added the Deprecate label Jul 9, 2016

@sinhrks sinhrks added this to the 0.19.0 milestone Jul 9, 2016

@jsexauer jsexauer referenced this pull request Jul 9, 2016

Open

DEPR: deprecations from prior versions #6581

0 of 83 tasks complete
# Temp,
# Categorical.categories is changed from str to bytes in PY3
# maybe the same as GH 13591
if PY3 and b.categories.inferred_type == 'string':

This comment has been minimized.

@sinhrks

sinhrks Jul 9, 2016

Member

seems to be the same issue as #13591

This comment has been minimized.

@jreback
try:
return p.freq
# now Timestamp / NaT has freq attr

This comment has been minimized.

@jreback

jreback Jul 9, 2016

Contributor

I though we have an is_period in inference.pyx? (it does this)

This comment has been minimized.

@jreback

jreback Jul 10, 2016

Contributor

right I see what we did with this now. ok

@jreback

View changes

pandas/tseries/index.py Outdated
converted = tslib.ints_to_pydatetime(
data[start_i:end_i], tz=self.tz, offset=self.offset, box=True)
converted = tslib.ints_to_pydatetime(data[start_i:end_i],
tz=self.tz, freq=self.offset,

This comment has been minimized.

@jreback

jreback Jul 9, 2016

Contributor

shouldn't this be self.freq?

This comment has been minimized.

@sinhrks

sinhrks Jul 10, 2016

Member

Fixed. Though DatetimeIndex.freq is a mapping to offset.

@jreback

View changes

pandas/tslib.pyx Outdated
@@ -338,25 +342,34 @@ class Timestamp(_Timestamp):
cdef _TSObject ts
cdef _Timestamp ts_base
if offset is not None:
# deprecate offset arg

This comment has been minimized.

@jreback

jreback Jul 9, 2016

Contributor

put the issue reference

@@ -911,16 +926,6 @@ cdef inline bint _is_multiple(int64_t us, int64_t mult):
return us % mult == 0
def apply_offset(ndarray[object] values, object offset):
cdef:

This comment has been minimized.

@jreback

jreback Jul 9, 2016

Contributor

not used?

This comment has been minimized.

@sinhrks

sinhrks Jul 10, 2016

Member

Not used, and the definition is meaningless.

@codecov-io

This comment has been minimized.

codecov-io commented Jul 9, 2016

Current coverage is 84.31%

No coverage report found for master at 1edc1df.

Powered by Codecov. Last updated by 1edc1df...c7749d5

@jreback

View changes

pandas/io/tests/test_packers.py Outdated
else:
tm.assert_categorical_equal(a, b)
elif a is NaT:
assert b is NaT

This comment has been minimized.

@jreback

jreback Jul 10, 2016

Contributor

we should prob change the comparators to be like the rest of pandas (e.g. assertTrue).... but can do later

@jreback jreback closed this in 2a96ab7 Jul 10, 2016

@jreback

This comment has been minimized.

Contributor

jreback commented Jul 10, 2016

thanks @sinhrks

I had to do a couple of more renames to avoid the warnings...but no biggie.

not that Timestamp.from_ordinal also needed changing, but I don't think its tested much.

@sinhrks sinhrks deleted the sinhrks:depr_timestamp_offset branch Jul 10, 2016

@sinhrks

This comment has been minimized.

Member

sinhrks commented Jul 10, 2016

Thanks, let me do a follow-up for testing fromordinal.

@sinhrks sinhrks referenced this pull request Jul 10, 2016

Closed

TST: add tests for Timestamp.toordinal/fromordinal #13610

3 of 3 tasks complete

jreback added a commit that referenced this pull request Jul 15, 2016

TST: add tests for Timestamp.toordinal/fromordinal
follow-up for #13593

Author: sinhrks <sinhrks@gmail.com>

Closes #13610 from sinhrks/depr_timestamp_offset2 and squashes the following commits:

28f8d41 [sinhrks] TST: add tests for Timestamp.toordinal

nateGeorge added a commit to nateGeorge/pandas that referenced this pull request Aug 15, 2016

DEPR: rename Timestamp.offset to .freq
closes pandas-dev#12160

Author: sinhrks <sinhrks@gmail.com>

Closes pandas-dev#13593 from sinhrks/depr_timestamp_offset and squashes the following commits:

c7749d5 [sinhrks] DEPR: rename Timestamp.offset to .freq

gfyoung added a commit to forking-repos/pandas that referenced this pull request Dec 24, 2017

CLN: Remove Timestamp.offset
Deprecated in v0.19.0

xref pandas-devgh-13593

@jreback jreback referenced this pull request Dec 24, 2017

Open

DEPR: deprecations log for removed issues #13777

115 of 115 tasks complete

jreback added a commit that referenced this pull request Dec 26, 2017

CLN: Remove Timestamp.offset (#18927)
Deprecated in v0.19.0

xref gh-13593

hexgnu added a commit to hexgnu/pandas that referenced this pull request Dec 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment