File tree Expand file tree Collapse file tree 3 files changed +4
-68
lines changed Expand file tree Collapse file tree 3 files changed +4
-68
lines changed Original file line number Diff line number Diff line change @@ -467,36 +467,7 @@ class NaTType(_NaT):
467
467
Return a new Timestamp representing UTC day and time.
468
468
"""
469
469
)
470
- fromisocalendar = _make_error_func(' fromisocalendar' , # noqa:E128
471
- """
472
- Timestamp.fromisocalendar(year, week, day)
473
-
474
- Return a new Timestamp corresponding to the
475
- ISO calendar date specified by year, week and day.
476
470
477
- Parameters
478
- ----------
479
- year: int
480
- Representing a year.
481
- week : int
482
- Value between 1-53, representing a week in a year.
483
- day : int
484
- Value between 1-7, representing a day in the week.
485
-
486
- Returns
487
- -------
488
- Timestamp
489
-
490
- Raises
491
- ------
492
- NotImplementedError
493
- If the running platform is a Python version earlier than 3.8
494
-
495
- Notes
496
- -----
497
- `week` can have the value of 53, only when year is a leap year.
498
- """
499
- )
500
471
timestamp = _make_error_func(' timestamp' , # noqa:E128
501
472
""" Return POSIX timestamp as float.""" )
502
473
Original file line number Diff line number Diff line change @@ -336,45 +336,6 @@ class Timestamp(_Timestamp):
336
336
"""
337
337
return cls (datetime.combine(date, time))
338
338
339
- @classmethod
340
- def fromisocalendar (cls , year , week , day ):
341
- """
342
- Timestamp.fromisocalendar(year, week, day)
343
-
344
- Return a new Timestamp corresponding to the
345
- ISO calendar date specified by year, week and day.
346
-
347
- Parameters
348
- ----------
349
- year: int
350
- Representing a year.
351
- week : int
352
- Value between 1-53, representing a week in a year.
353
- day : int
354
- Value between 1-7, representing a day in the week.
355
-
356
- Returns
357
- -------
358
- Timestamp
359
-
360
- Raises
361
- ------
362
- NotImplementedError
363
- If the running platform is a Python version earlier than 3.8
364
-
365
- Notes
366
- -----
367
- `week` can have the value of 53, only when year is a leap year.
368
- """
369
- import pandas.compat as compat
370
-
371
- if not compat.PY38:
372
- raise NotImplementedError (
373
- " 'fromisocalendar' is not supported for versions earlier than 3.8"
374
- )
375
-
376
- return cls (datetime.fromisocalendar(year, week, day))
377
-
378
339
def __new__ (
379
340
cls ,
380
341
object ts_input = _no_input,
Original file line number Diff line number Diff line change @@ -298,6 +298,10 @@ def test_overlap_public_nat_methods(klass, expected):
298
298
if klass is Timestamp and not compat .PY37 :
299
299
expected .remove ("fromisoformat" )
300
300
301
+ # "fromisocalendar" was introduced in 3.8
302
+ if klass is Timestamp and not compat .PY38 :
303
+ expected .remove ("fromisocalendar" )
304
+
301
305
assert _get_overlap_public_nat_methods (klass ) == expected
302
306
303
307
You can’t perform that action at this time.
0 commit comments