Skip to content

Commit 5a6bbb9

Browse files
itholicHyukjinKwon
authored andcommitted
Add missing tests for datetime & Remove unsupported property (#729)
Add missing test for `weekday` ![스크린샷 2019-08-31 오후 3 01 12](https://user-images.githubusercontent.com/44108233/64059916-3acb9e80-cc00-11e9-9b5a-1ac2c7b3fca1.png) Remove unsupported property `millisecond` for Series Datetime Properties. <img width="765" alt="스크린샷 2019-08-31 오후 2 49 55" src="https://user-images.githubusercontent.com/44108233/64059919-474ff700-cc00-11e9-8c5e-386cd7c989c5.png">
1 parent 9ba4bc4 commit 5a6bbb9

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

databricks/koalas/datetimes.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,6 @@ def second(self) -> 'ks.Series':
105105
"""
106106
return _wrap_accessor_spark(self, F.second, LongType()).alias(self.name)
107107

108-
@property
109-
def millisecond(self) -> 'ks.Series':
110-
"""
111-
The milliseconds of the datetime.
112-
"""
113-
return _wrap_accessor_pandas(
114-
self, lambda x: x.dt.millisecond, LongType()).alias(self.name)
115-
116108
@property
117109
def microsecond(self) -> 'ks.Series':
118110
"""

databricks/koalas/tests/test_series_datetime.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ def test_weekofyear(self):
115115
def test_dayofweek(self):
116116
self.check_func(lambda x: x.dt.dayofweek)
117117

118+
def test_weekday(self):
119+
self.check_func(lambda x: x.dt.weekday)
120+
118121
def test_dayofyear(self):
119122
self.check_func(lambda x: x.dt.dayofyear)
120123

docs/source/reference/series.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ Datetime Properties
218218
Series.dt.hour
219219
Series.dt.minute
220220
Series.dt.second
221-
Series.dt.millisecond
222221
Series.dt.microsecond
223222
Series.dt.week
224223
Series.dt.weekofyear

0 commit comments

Comments
 (0)