Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
df9f894
implement DatetimeLikeArray
jbrockmendel Feb 26, 2018
004f137
docstring
jbrockmendel Feb 26, 2018
db72494
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Feb 27, 2018
80b525e
move classes to array directory
jbrockmendel Feb 27, 2018
54009d4
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Feb 27, 2018
65dc829
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Feb 27, 2018
4c5a05c
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Feb 28, 2018
b91ddac
flake8 fixup remove unused import
jbrockmendel Mar 1, 2018
080e477
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Mar 2, 2018
e19f70a
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Mar 7, 2018
47d365e
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Mar 18, 2018
3a67bce
comments for cache_readonlys, append Mixin to name, add imports to __…
jbrockmendel Mar 18, 2018
7fc73eb
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Apr 6, 2018
9edd9bc
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Apr 11, 2018
1236273
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Apr 24, 2018
1ab6263
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Apr 26, 2018
9a28188
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel May 16, 2018
6b17031
fix merge screwup
jbrockmendel May 17, 2018
b03689a
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel May 25, 2018
a055d40
rename arrays to FooArray Mixin
jbrockmendel May 25, 2018
d1faeb6
fixups imports
jbrockmendel May 25, 2018
fcb8d6a
fixup namerror
jbrockmendel May 25, 2018
8cee92c
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel May 26, 2018
375329e
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Jun 4, 2018
71dfe08
fixup missing import
jbrockmendel Jun 4, 2018
59c60a2
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Jun 7, 2018
9db2b78
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Jun 10, 2018
308c25b
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Jun 11, 2018
94bdfcb
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Jun 20, 2018
d589e2a
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Jun 22, 2018
0d4f48a
reorder imports
jbrockmendel Jun 22, 2018
1b910c7
De-pluralize
jbrockmendel Jun 22, 2018
cece116
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Jun 28, 2018
828022a
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Jun 29, 2018
ed83046
fixup remove unused import
jbrockmendel Jun 29, 2018
c1934db
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Jun 29, 2018
a684c2d
Merge branch 'master' of https://github.com/pandas-dev/pandas into dt…
jbrockmendel Jul 2, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix merge screwup
  • Loading branch information
jbrockmendel committed May 17, 2018
commit 6b17031becd9346131a8202defbe12935d3cdb9e
19 changes: 18 additions & 1 deletion pandas/core/arrays/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class DatetimeLikeArrayMixin(object):

Assumes that __new__/__init__ defines:
_data
freq
_freq

and that the inheriting class has methods:
_validate_frequency
"""

@property
Expand Down Expand Up @@ -79,6 +82,20 @@ def _maybe_mask_results(self, result, fill_value=None, convert=None):
return result

# ------------------------------------------------------------------
# Frequency Properties/Methods

@property
def freq(self):
"""Return the frequency object if it is set, otherwise None"""
return self._freq

@freq.setter
def freq(self, value):
if value is not None:
value = frequencies.to_offset(value)
self._validate_frequency(self, value)

self._freq = value

@property
def freqstr(self):
Expand Down
10 changes: 0 additions & 10 deletions pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ def _timezone(self):
""" Comparable timezone both for pytz / dateutil"""
return timezones.get_timezone(self.tzinfo)

@property
def freq(self):
"""get/set the frequency of the instance"""
return self._freq

@freq.setter
def freq(self, value):
"""get/set the frequency of the instance"""
self._freq = value

@property
def offset(self):
"""get/set the frequency of the instance"""
Expand Down
13 changes: 0 additions & 13 deletions pandas/core/indexes/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,19 +228,6 @@ def _validate_frequency(cls, index, freq, **kwargs):
'conform to passed frequency {passed}')
raise ValueError(msg.format(infer=inferred, passed=freq.freqstr))

@property
def freq(self):
"""Return the frequency object if it is set, otherwise None"""
return self._freq

@freq.setter
def freq(self, value):
if value is not None:
value = frequencies.to_offset(value)
self._validate_frequency(self, value)

self._freq = value


class DatetimeIndexOpsMixin(DatetimeLikeArrayMixin):
""" common ops mixin to support a unified interface datetimelike Index """
Expand Down